Class Message
Base class for other HTTP requests/responses
Defines some common helper methods, constants and properties.
Direct Subclasses
Constants summary
-
string'DELETE' -
string'GET' -
string'HEAD' -
string'OPTIONS' -
string'PATCH' -
string'POST' -
string'PUT' -
string'TRACE' -
integer202 -
integer201 -
integer302 -
integer301 -
integer200 -
integer303 -
integer307
Properties summary
-
$_cookiesprotectedThe array of cookies in the response.array -
$_headersprotectedThe array of headers in the response.array -
$_versionprotectedHTTP Version being used.string
Method Summary
- _normalizeHeader() protectedNormalize header names to Camel-Case form.
- body() publicGet/set the body for the message.
- cookies() publicGet all cookies
- headers() publicGet all headers
- version() publicGet the HTTP version used.
Method Detail
_normalizeHeader()source protected
_normalizeHeader( string $name )
Normalize header names to Camel-Case form.
Parameters
- string
$name - The header name to normalize.
Returns
stringNormalized header name.
body()source public
body( string|null $body null )
Get/set the body for the message.
Parameters
- string|null
$bodyoptional null - The body for the request. Leave null for get
Returns
mixedEither $this or the body value.
Properties detail
© 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.
http://api.cakephp.org/3.2/class-Cake.Network.Http.Message.html