HTTP Request exception
-
Extends
Exception RuntimeException GuzzleHttp\Exception\TransferException - Children
- Implements
Methods |
public __construct ( string $message , Psr\Http\Message\RequestInterface $request , ? Psr\Http\Message\ResponseInterface $response = NULL , ? Throwable $previous = NULL , array $handlerContext = [ ] ) |
public
static
create
(
Psr\Http\Message\RequestInterface
$request
,
?
Psr\Http\Message\ResponseInterface
$response
=
NULL
,
?
Throwable
$previous
=
NULL
,
array
$handlerContext
=
[
]
,
?
GuzzleHttp\BodySummarizerInterface
$bodySummarizer
=
NULL
) :
self
Factory method to create a new exception with a normalized error message |
public
getHandlerContext
() :
array
Get contextual information about the error from the underlying handler. The contents of this array will vary depending on which handler you are |
public
getRequest
() :
Psr\Http\Message\RequestInterface
Get the request that caused the exception |
public
getResponse
() : ?
Psr\Http\Message\ResponseInterface
Get the associated response |
public
hasResponse
() :
bool
Check if a response was received |
public
static
wrapException
(
Psr\Http\Message\RequestInterface
$request
,
Throwable
$e
) :
GuzzleHttp\Exception\RequestException
Wrap non-RequestExceptions with a RequestException |
Properties |
Properties |
private
$handlerContext
|
private
$request
|
private
$response
|
Methods |
private
static
obfuscateUri
(
Psr\Http\Message\UriInterface
$uri
) :
Psr\Http\Message\UriInterface
Obfuscates URI if there is a username and a password present |
Methods |
public
static
create
(
Psr\Http\Message\RequestInterface
$request
,
?
Psr\Http\Message\ResponseInterface
$response
=
NULL
,
?
Throwable
$previous
=
NULL
,
array
$handlerContext
=
[
]
,
?
GuzzleHttp\BodySummarizerInterface
$bodySummarizer
=
NULL
) :
self
Factory method to create a new exception with a normalized error message |
private
static
obfuscateUri
(
Psr\Http\Message\UriInterface
$uri
) :
Psr\Http\Message\UriInterface
Obfuscates URI if there is a username and a password present |
public
static
wrapException
(
Psr\Http\Message\RequestInterface
$request
,
Throwable
$e
) :
GuzzleHttp\Exception\RequestException
Wrap non-RequestExceptions with a RequestException |