%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/jalalj2hb/www/G/vendor/php-http/client-common/src/
Upload File :
Create Path :
Current File : /home/jalalj2hb/www/G/vendor/php-http/client-common/src/HttpClientEmulator.php

<?php

namespace Http\Client\Common;

use Psr\Http\Message\RequestInterface;

/**
 * Emulates an HTTP Client in an HTTP Async Client.
 *
 * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
 */
trait HttpClientEmulator
{
    /**
     * {@inheritdoc}
     *
     * @see HttpClient::sendRequest
     */
    public function sendRequest(RequestInterface $request)
    {
        $promise = $this->sendAsyncRequest($request);

        return $promise->wait();
    }

    /**
     * {@inheritdoc}
     *
     * @see HttpAsyncClient::sendAsyncRequest
     */
    abstract public function sendAsyncRequest(RequestInterface $request);
}

Zerion Mini Shell 1.0