Class Message
Base class for other HTTP requests/responses
Defines some common helper methods, constants and properties.
Direct Subclasses
Constants summary
-
stringMETHOD_DELETE'DELETE' -
stringMETHOD_GET'GET' -
stringMETHOD_HEAD'HEAD' -
stringMETHOD_OPTIONS'OPTIONS' -
stringMETHOD_PATCH'PATCH' -
stringMETHOD_POST'POST' -
stringMETHOD_PUT'PUT' -
stringMETHOD_TRACE'TRACE' -
integerSTATUS_ACCEPTED202 -
integerSTATUS_CREATED201 -
integerSTATUS_FOUND302 -
integerSTATUS_MOVED_PERMANENTLY301 -
integerSTATUS_NON_AUTHORITATIVE_INFORMATION203 -
integerSTATUS_NO_CONTENT204 -
integerSTATUS_OK200 -
integerSTATUS_SEE_OTHER303 -
integerSTATUS_TEMPORARY_REDIRECT307
Properties summary
-
$_bodyprotectedBody for the message.string|null -
$_cookiesprotectedThe array of cookies in the response.array
Magic properties summary
-
$headerspublicarray
Method Summary
Method Detail
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.
headers()source public deprecated
headers( )
Get all headers
Deprecated
3.3.0 Use getHeaders() instead.Returns
arrayProperties detail
Magic properties detail
$headerssource
public array
© 2005–present 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/3.7/class-Cake.Http.Client.Message.html