Class Message
Base class for other HTTP requests/responses
Defines some common helper methods, constants and properties.
Direct known subclasses
Cake\Network\Http\Request, Cake\Network\Http\ResponseMethod Detail
_normalizeHeadersource protected
_normalizeHeader( string $name )
Normalize header names to Camel-Case form.
Parameters
-
string
$name
- The header name to normalize.
Returns
string
Normalized header name.
bodysource public
body( string|null $body null )
Get/set the body for the message.
Parameters
-
string|null
$body
optional null - The body for the request. Leave null for get
Returns
mixed
Either $this or the body value.
Constants summary
string |
METHOD_DELETE HTTP DELETE method |
'DELETE'
|
string |
METHOD_GET HTTP GET method |
'GET'
|
string |
METHOD_HEAD HTTP HEAD method |
'HEAD'
|
string |
METHOD_OPTIONS HTTP OPTIONS method |
'OPTIONS'
|
string |
METHOD_PATCH HTTP PATCH method |
'PATCH'
|
string |
METHOD_POST HTTP POST method |
'POST'
|
string |
METHOD_PUT HTTP PUT method |
'PUT'
|
string |
METHOD_TRACE HTTP TRACE method |
'TRACE'
|
integer |
STATUS_ACCEPTED HTTP 202 code |
202
|
integer |
STATUS_CREATED HTTP 201 code |
201
|
integer |
STATUS_FOUND HTTP 302 code |
302
|
integer |
STATUS_MOVED_PERMANENTLY HTTP 301 code |
301
|
integer |
STATUS_OK HTTP 200 code |
200
|
integer |
STATUS_SEE_OTHER HTTP 303 code |
303
|
integer |
STATUS_TEMPORARY_REDIRECT HTTP 307 code |
307
|
Properties summary
© 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.1/class-Cake.Network.Http.Message.html