private static function createRejection(EasyHandle
$easy, array
$ctx): PromiseInterface
{ static $connectionErrors =
[ \CURLE_OPERATION_TIMEOUTED => true,
\CURLE_COULDNT_RESOLVE_HOST => true,
\CURLE_COULDNT_CONNECT => true,
\CURLE_SSL_CONNECT_ERROR => true,
\CURLE_GOT_NOTHING => true,
];
if ($easy->createResponseException
) { return P\Create::
rejectionFor( new RequestException( 'An error was encountered while creating the response',
$easy->request,
$easy->response,
$easy->createResponseException,
$ctx ) );
} // If an exception was encountered during the onHeaders event, then