Thrown when the request cannot be completed because of network issues.
There is no response object as this exception is thrown when no response has been received.
Example: the target host name can not be resolved or the connection failed.
Psr\Http\Message\RequestInterface
Constructor.
Returns the request.
__construct(string $message, Psr\Http\Message\RequestInterface $request, Throwable|null $previous = null)
Constructor.
string
$message Exeception message.
Psr\Http\Message\RequestInterface
$request Request instance.
Throwable|null
$previous optional Previous Exception
getRequest(): Psr\Http\Message\RequestInterface
Returns the request.
The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
Psr\Http\Message\RequestInterface
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.NetworkException.html