Class Guzzle\Http\Exception\BadResponseException

InheritanceGuzzle\Http\Exception\BadResponseException » Guzzle\Http\Exception\RequestException » Guzzle\Common\Exception\RuntimeException » RuntimeException
ImplementsGuzzle\Common\Exception\GuzzleException, Guzzle\Http\Exception\HttpException
SubclassesGuzzle\Http\Exception\ClientErrorResponseException, Guzzle\Http\Exception\ServerErrorResponseException, Guzzle\Http\Exception\TooManyRedirectsException

Http request exception thrown when a bad response is received

Public Methods

Hide inherited methods

MethodDescriptionDefined By
factory() Factory method to create a new response exception based on the response code. Guzzle\Http\Exception\BadResponseException
getRequest() Get the request that caused the exception Guzzle\Http\Exception\RequestException
getResponse() Get the response that caused the exception Guzzle\Http\Exception\BadResponseException
setRequest() Set the request that caused the exception Guzzle\Http\Exception\RequestException
setResponse() Set the response that caused the exception Guzzle\Http\Exception\BadResponseException

Method Details

factory() public static method

Factory method to create a new response exception based on the response code.

public static Guzzle\Http\Exception\BadResponseException factory ( Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response )
$request Guzzle\Http\Message\RequestInterface

Request

$response Guzzle\Http\Message\Response

Response received

getResponse() public method

Get the response that caused the exception

public Guzzle\Http\Message\Response getResponse ( )
setResponse() public method

Set the response that caused the exception

public void setResponse ( Guzzle\Http\Message\Response $response )
$response Guzzle\Http\Message\Response

Response to set