Class BadResponseException
Http request exception thrown when a bad response is received
- Exception
- RuntimeException
- Guzzle\Common\Exception\RuntimeException implements Guzzle\Common\Exception\GuzzleException
- Guzzle\Http\Exception\RequestException implements Guzzle\Http\Exception\HttpException
- Guzzle\Http\Exception\BadResponseException
Direct known subclasses
Guzzle\Http\Exception\ClientErrorResponseException
,
Guzzle\Http\Exception\ServerErrorResponseException
,
Guzzle\Http\Exception\TooManyRedirectsException
Methods summary
-
public static
factory ( Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response )
Factory method to create a new response exception based on the response code.
-
public
setResponse ( Guzzle\Http\Message\Response $response )
Set the response that caused the exception
-
public
getResponse ( )
Get the response that caused the exception
Methods detail
#
public static
Guzzle\Http\Exception\BadResponseException
factory( Guzzle\Http\Message\RequestInterface
$request, Guzzle\Http\Message\Response
$response )
Factory method to create a new response exception based on the response code.
Parameters
- $request
Guzzle\Http\Message\RequestInterface
$request Request- $response
Guzzle\Http\Message\Response
$response Response received
Returns
Set the response that caused the exception
Parameters
- $response
Guzzle\Http\Message\Response
$response Response to set
Methods inherited from Guzzle\Http\Exception\RequestException
Methods inherited from Exception
__construct()
,
__toString()
,
__wakeup()
,
getCode()
,
getFile()
,
getLine()
,
getMessage()
,
getPrevious()
,
getTrace()
,
getTraceAsString()