function HttpException::__construct
Same name in this branch
- 11.1.x vendor/symfony/http-kernel/Exception/HttpException.php \Symfony\Component\HttpKernel\Exception\HttpException::__construct()
Parameters
string $message:
Overrides RequestException::__construct
File
-
vendor/
php-http/ httplug/ src/ Exception/ HttpException.php, line 25
Class
- HttpException
- Thrown when a response was received but the request itself failed.
Namespace
Http\Client\ExceptionCode
public function __construct($message, RequestInterface $request, ResponseInterface $response, ?\Exception $previous = null) {
parent::__construct($message, $request, $previous);
$this->response = $response;
$this->code = $response->getStatusCode();
}