On this page
Class RequestException
Exception for when a request failed.
Examples:
- Request is invalid (e.g. method is missing)
- Runtime request errors (e.g. the body stream is not seekable)
Namespace: Cake\Http\Client\Exception
Property Summary
-
$request protected
Psr\Http\Message\RequestInterface
Method Summary
__construct() public
Constructor.
getRequest() public
Returns the request.
Method Detail
__construct() public
__construct(string $message, Psr\Http\Message\RequestInterface $request, Throwable|null $previous = null)
Constructor.
Parameters
string
$message-
Exeception message.
Psr\Http\Message\RequestInterface
$request-
Request instance.
Throwable|null
$previous optional-
Previous Exception
getRequest() public
getRequest(): Psr\Http\Message\RequestInterface
Returns the request.
The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
Returns
Psr\Http\Message\RequestInterface
Property Detail
$request protected
Type
Psr\Http\Message\RequestInterface
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Http.Client.Exception.RequestException.html