HTTP Response from HttpSocket.
body
, code
, context
, cookies
, headers
, httpVersion
, raw
, reasonPhrase
__construct( string $message null )
Constructor
$message
optional null _decodeBody( string $body , string|boolean $encoding 'chunked' )
Generic function to decode a $body with a given $encoding. Returns either an array with the keys 'body' and 'header' or false on failure.
$body
$encoding
optional 'chunked' _decodeChunkedBody( string $body )
Decodes a chunked message $body and returns either an array with the keys 'body' and 'header' or false as a result.
$body
SocketException
_parseHeader( array $header )
Parses an array based header.
$header
_tokenEscapeChars( boolean $hex true , array $chars null )
Gets escape chars according to RFC 2616 (HTTP 1.1 specs).
$hex
optional true $chars
optional null _unescapeToken( string $token , array $chars null )
Unescapes a given $token according to RFC 2616 (HTTP 1.1 specs)
$token
$chars
optional null getHeader( string $name , array $headers null )
Get header in case insensitive
$name
$headers
optional null offsetExists( string $offset )
ArrayAccess - Offset Exists
$offset
ArrayAccess::offsetExists()
offsetGet( string $offset )
ArrayAccess - Offset Get
$offset
ArrayAccess::offsetGet()
offsetSet( string $offset , mixed $value )
ArrayAccess - Offset Set
$offset
$value
ArrayAccess::offsetSet()
offsetUnset( string $offset )
ArrayAccess - Offset Unset
$offset
ArrayAccess::offsetUnset()
parseCookies( array $header )
Parses cookies in response headers.
$header
parseResponse( string $message )
Parses the given message and breaks it down in parts.
$message
SocketException
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-HttpResponse.html