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'
-
integer
202
-
integer
201
-
integer
302
-
integer
301
-
integer
200
-
integer
303
-
integer
307
Properties summary
-
$_body
protectedBody for the message.string|null
-
$_cookies
protectedThe array of cookies in the response.array
Magic properties summary
-
$headers
publicarray
Method Summary
- body() publicGet/set the body for the message.
- cookies() publicGet all cookies
- headers() publicGet all headers
Method Detail
body()source 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
mixedEither $this or the body value.
headers()source public
headers( )
Get all headers
Deprecated
3.3.0 Use getHeaders() instead.Returns
arrayProperties detail
Magic properties detail
$headerssource
public array
© 2005–2017 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.4/class-Cake.Http.Client.Message.html