Class Message
Base class for other HTTP requests/responses
Defines some common helper methods, constants and properties.
Namespace: Cake\Http\Client
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' -
intSTATUS_ACCEPTED202 -
intSTATUS_CREATED201 -
intSTATUS_FOUND302 -
intSTATUS_MOVED_PERMANENTLY301 -
intSTATUS_NON_AUTHORITATIVE_INFORMATION203 -
intSTATUS_NO_CONTENT204 -
intSTATUS_OK200 -
intSTATUS_SEE_OTHER303 -
intSTATUS_TEMPORARY_REDIRECT307
Properties summary
Method Summary
Method Detail
body() public
body(mixed $body)
Get/set the body for the message.
Parameters
-
string|null$body optional The body for the request. Leave null for get
Returns
mixedEither $this or the body value.
cookies() public
cookies()
Get all cookies
Returns
arrayheaders() public
headers()
Get all headers
Returns
arrayProperty Detail
$_body protected
Body for the message.
Type
string|null$_cookies protected
The array of cookies in the response.
Type
array$headers public
Type
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.9/class-Cake.Http.Client.Message.html