Class Message
Base class for other HTTP requests/responses
Defines some common helper methods, constants and properties.
Namespace: Cake\Http\Client
Constants summary
-
string
METHOD_DELETE'DELETE'
-
string
METHOD_GET'GET'
-
string
METHOD_HEAD'HEAD'
-
string
METHOD_OPTIONS'OPTIONS'
-
string
METHOD_PATCH'PATCH'
-
string
METHOD_POST'POST'
-
string
METHOD_PUT'PUT'
-
string
METHOD_TRACE'TRACE'
-
int
STATUS_ACCEPTED202
-
int
STATUS_CREATED201
-
int
STATUS_FOUND302
-
int
STATUS_MOVED_PERMANENTLY301
-
int
STATUS_NON_AUTHORITATIVE_INFORMATION203
-
int
STATUS_NO_CONTENT204
-
int
STATUS_OK200
-
int
STATUS_SEE_OTHER303
-
int
STATUS_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
mixed
Either $this or the body value.
cookies() public
cookies()
Get all cookies
Returns
array
headers() public
headers()
Get all headers
Returns
array
Property 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