Exception for unknown status responses
package | Requests |
---|---|
inherited_from | \Requests_Exception_HTTP |
__construct(string|null $reason= null
, mixed $data= null
)
If $data
is an instance of \Requests_Response, uses the status
code from it. Otherwise, sets as 0
inherited_from | \Requests_Exception_HTTP::__construct() |
---|
string
null
Reason phrase
mixed
Associated data
__construct(string $message, string $type, mixed $data= null
, integer $code= 0
)
string
Exception message
string
Exception type
mixed
Associated data
integer
Exception numerical code, if applicable
getData() : mixed
codeCoverageIgnore |
---|
mixed
getReason()
getType() : string
codeCoverageIgnore |
---|
string
get_class(integer|boolean $code) : string
integer
boolean
HTTP status code, or false if unavailable
string
Exception class name to use$code : integer | boolean
0
inherited_from | \Requests_Exception_HTTP::code |
---|
$code : integer
0
$data : mixed
$reason : string
'Unknown'
inherited_from | \Requests_Exception_HTTP::reason |
---|
$reason : string
'Unknown'
$type : string