\Horde_Http_Response_Curl

HTTP response object for the curl backend.

Summary

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

$_info

$_info : array

Info on the request obtained from curl_getinfo().

Type

array

$_body

$_body : string

Response body.

Type

string

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, string  $curlresult, array  $curlinfo) 

Constructor.

Parameters

string $uri
string $curlresult
array $curlinfo

_parseHeaders()

_parseHeaders(array  $headers) : array

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

Parameters

array $headers

Returns

array

_parseResult()

_parseResult(string  $curlresult) 

Parses the combined header/body result from cURL.

Parameters

string $curlresult

_parseInfo()

_parseInfo(array  $curlinfo) 

Processes the results of curl_getinfo.

Parameters

array $curlinfo