\Horde_Http_Response_Peclhttp2

HTTP response object for the pecl_http 2.0 backend.

Summary

Methods
Properties
Constants
getBody()
getStream()
getHeader()
__construct()
$uri
$httpVersion
$code
$headers
No constants found
_parseHeaders()
$_headers
$_response
N/A
No private methods found
No private properties found
N/A

Properties

$uri

$uri : string

Fetched URI.

Type

string

$httpVersion

$httpVersion : float

HTTP protocol version that was used.

Type

float

$code

$code : integer

HTTP response code.

Type

integer

$headers

$headers : array

Response headers.

Type

array

$_headers

$_headers : \Horde_Support_CaseInsensitiveArray

Case-insensitive list of headers.

Type

\Horde_Support_CaseInsensitiveArray

$_response

$_response : \http\Client\Response

HttpMessage object.

Type

\http\Client\Response

Methods

getBody()

getBody() : string

Returns the body of the HTTP response.

Returns

string —

HTTP response body.

getStream()

getStream() 

Returns a stream pointing to the response body that can be used with all standard PHP stream functions.

getHeader()

getHeader(string  $header) : string

Returns the value of a single response header.

Parameters

string $header

Header name to get ('Content-Type', 'Content-Length', etc.).

Returns

string —

HTTP header value.

__construct()

__construct(string  $uri, \http\Client\Response  $response) 

Constructor.

Parameters

string $uri
\http\Client\Response $response

_parseHeaders()

_parseHeaders(array  $headers) : array

Parses an array of response headers, mindful of line continuations, etc.

Parameters

array $headers

Returns

array