芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/public_html/vendor/php-http/client-common/src/HttpAsyncClientEmulator.php
*/ trait HttpAsyncClientEmulator { /** * {@inheritdoc} * * @see HttpClient::sendRequest */ abstract public function sendRequest(RequestInterface $request): ResponseInterface; /** * {@inheritdoc} * * @see HttpAsyncClient::sendAsyncRequest */ public function sendAsyncRequest(RequestInterface $request) { try { return new Promise\HttpFulfilledPromise($this->sendRequest($request)); } catch (Exception $e) { return new Promise\HttpRejectedPromise($e); } } }