\Horde_Http_Response_Base

Base class for HTTP response objects.

Summary

Methods
Properties
Constants
getBody()
getStream()
getHeader()
$uri
$httpVersion
$code
$headers
No constants found
_parseHeaders()
$_headers
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

Methods

getBody()

getBody() : string

Returns the body of the HTTP response.

Throws

\Horde_Http_Exception

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.

_parseHeaders()

_parseHeaders(array  $headers) : array

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

Parameters

array $headers

Returns

array