Class Message
Base class for other HTTP requests/responses
Defines some common helper methods, constants
and properties.
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
203
-
integer
204
-
integer
200
-
integer
303
-
integer
307
Method Detail
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.
cookies( )
Get all cookies
Returns
array
headers( )
Get all headers
Deprecated
3.3.0 Use getHeaders() instead.
Returns
array
Properties detail
protected
array
The array of cookies in the response.