Open Monograph Press  3.3.0
Http\Client\Exception\HttpException Class Reference
Inheritance diagram for Http\Client\Exception\HttpException:
Http\Client\Exception\RequestException Http\Client\Exception\TransferException Psr\Http\Client\RequestExceptionInterface Http\Client\Exception Psr\Http\Client\ClientExceptionInterface Psr\Http\Client\ClientExceptionInterface

Public Member Functions

 __construct ( $message, RequestInterface $request, ResponseInterface $response, \Exception $previous=null)
 
 getResponse ()
 
- Public Member Functions inherited from Http\Client\Exception\RequestException
 __construct ($message, RequestInterface $request, \Exception $previous=null)
 
- Public Member Functions inherited from Psr\Http\Client\RequestExceptionInterface
 getRequest ()
 

Static Public Member Functions

static create (RequestInterface $request, ResponseInterface $response, \Exception $previous=null)
 

Protected Attributes

 $response
 

Additional Inherited Members

- Data Fields inherited from Http\Client\Exception
trait RequestAwareTrait
 

Detailed Description

Thrown when a response was received but the request itself failed.

In addition to the request, this exception always provides access to the response object.

Author
Márk Sági-Kazár mark..nosp@m.sagi.nosp@m.kazar.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 15 of file vendor/php-http/httplug/src/Exception/HttpException.php.

Constructor & Destructor Documentation

◆ __construct()

Http\Client\Exception\HttpException::__construct (   $message,
RequestInterface  $request,
ResponseInterface  $response,
\Exception  $previous = null 
)
Parameters
string$message
RequestInterface$request
ResponseInterface$response
\Exception | null$previous

Definition at line 31 of file vendor/php-http/httplug/src/Exception/HttpException.php.

References Http\Client\Exception\HttpException\$response.

Member Function Documentation

◆ create()

static Http\Client\Exception\HttpException::create ( RequestInterface  $request,
ResponseInterface  $response,
\Exception  $previous = null 
)
static

Factory method to create a new exception with a normalized error message.

Definition at line 56 of file vendor/php-http/httplug/src/Exception/HttpException.php.

References Http\Client\Exception\HttpException\$response.

◆ getResponse()

Http\Client\Exception\HttpException::getResponse ( )

Returns the response.

Returns
ResponseInterface

Definition at line 48 of file vendor/php-http/httplug/src/Exception/HttpException.php.

References Http\Client\Exception\HttpException\$response.

Field Documentation

◆ $response


The documentation for this class was generated from the following file: