Ergo\Http\Response::getHeaders PHP Method

getHeaders() public method

public getHeaders ( ) : HeaderCollection
return HeaderCollection
    public function getHeaders()
    {
        return $this->_headers;
    }

Usage Example

Example #1
0
 public function testGettingAResponseHeader()
 {
     $headers = array(new Http\HeaderField('Content-Length', 6), new Http\HeaderField('Content-Type', 'text/plain'));
     $response = new Http\Response(200, $headers, 'abcdef');
     $this->assertEquals($response->getHeaders()->value('Content-Length'), 6);
 }