if ($body->
isSeekable()) { $body->
rewind();
} return new FulfilledPromise($easy->response
);
} private static function invokeStats(EasyHandle
$easy): void
{ $curlStats = \
curl_getinfo($easy->handle
);
$curlStats['appconnect_time'
] = \
curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME
);
$stats =
new TransferStats( $easy->request,
$easy->response,
$curlStats['total_time'
],
$easy->errno,
$curlStats );
($easy->options
['on_stats'
])($stats);
} /**
* @param callable(RequestInterface, array): PromiseInterface $handler
*/