Warning! You are currently reading the documentation for Requests 1.x.
It is recommended to upgrade to Requests 2.x at your earliest convenience.
Upgrading to Requests 2.x is fairly straight-forward.
A full list of the changes can be found in the Changelog.
Visit the documentation for Requests_Response
in Requests 2.x.
Class Requests_Response
HTTP response class
Contains a response from Requests::request()
public
|
|
public
boolean
|
|
public
|
#
throw_for_status( boolean $allow_redirects = true )
Throws an exception if the request was not successful |
public
string
|
$body
Response body |
#
''
|
public
string
|
$raw
Raw HTTP data from the transport |
#
''
|
public
|
$headers
Headers, as an associative array |
#
array()
|
public
integer|boolean
|
$status_code
Status code, false if non-blocking |
#
false
|
public
float|boolean
|
$protocol_version
Protocol version, false if non-blocking |
#
false
|
public
boolean
|
$success
Whether the request succeeded or not |
#
false
|
public
integer
|
$redirects
Number of redirects the request used |
#
0
|
public
string
|
$url
URL requested |
#
''
|
public
array
|
$history
Previous requests (from redirects) |
#
array()
|
public
|
$cookies
Cookies from the request |
#
array()
|