function RequestException::__construct
Same name in this branch
- 11.1.x vendor/php-http/httplug/src/Exception/RequestException.php \Http\Client\Exception\RequestException::__construct()
2 calls to RequestException::__construct()
- BadResponseException::__construct in vendor/
guzzlehttp/ guzzle/ src/ Exception/ BadResponseException.php - BadResponseException::__construct in vendor/
guzzlehttp/ guzzle/ src/ Exception/ BadResponseException.php
1 method overrides RequestException::__construct()
- BadResponseException::__construct in vendor/
guzzlehttp/ guzzle/ src/ Exception/ BadResponseException.php
File
-
vendor/
guzzlehttp/ guzzle/ src/ Exception/ RequestException.php, line 31
Class
- RequestException
- HTTP Request exception
Namespace
GuzzleHttp\ExceptionCode
public function __construct(string $message, RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $previous = null, array $handlerContext = []) {
// Set the code of the exception if the response is set and not future.
$code = $response ? $response->getStatusCode() : 0;
parent::__construct($message, $code, $previous);
$this->request = $request;
$this->response = $response;
$this->handlerContext = $handlerContext;
}