for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Nekhay <[email protected]>
* @copyright Copyright (c) 2018, Anatoly Nekhay
* @license https://github.com/sunrise-php/http-client-curl/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-client-curl
*/
declare(strict_types=1);
namespace Sunrise\Http\Client\Curl\Exception;
use Psr\Http\Client\NetworkExceptionInterface;
use Psr\Http\Message\RequestInterface;
use Throwable;
final class NetworkException extends ClientException implements NetworkExceptionInterface
{
public function __construct(
private readonly RequestInterface $request,
string $message = '',
int $code = 0,
?Throwable $previous = null
) {
parent::__construct($message, $code, $previous);
}
public function getRequest(): RequestInterface
return $this->request;