src/Protocol/Http/Sender/CurlHttpSender.php
public function send(Request $request): Response
    {
        $this->initializeCurlResource();
        $this->prepareCurlResourceByRequest($request);

        $content = curl_exec($this->resource);

        if (false === $content) {
            throw new HttpSenderException(sprintf(
                'cURL Error [%d]: %s',
                (int) curl_errno($this->resource),
                (string) curl_error($this->resource)
            ));
        }

        $statusCode = (int) curl_getinfo($this->resource, CURLINFO_HTTP_CODE);

        return new Response($statusCode, (string) $content);
    }
public function send(Request $request): Response
    {
        $this->initializeCurlResource();
        $this->prepareCurlResourceByRequest($request);

        $content = curl_exec($this->resource);

        if (false === $content) {
            throw new HttpSenderException(sprintf(
                'cURL Error [%d]: %s',
                (int) curl_errno($this->resource),
                (string) curl_error($this->resource)
            ));
        }

        $statusCode = (int) curl_getinfo($this->resource, CURLINFO_HTTP_CODE);

        return new Response($statusCode, (string) $content);
    }
public function send ( Request $ request ) : Response { $ this -> initializeCurlResource ( ) ; $ this -> prepareCurlResourceByRequest ( $ request ) ; $ content = curl_exec ( $ this -> resource ) ; if ( false === $ content ) { throw new HttpSenderException ( sprintf ( 'cURL Error [%d]: %s' , ( int ) curl_errno ( $ this -> resource ) , ( string ) curl_error ( $ this -> resource ) ) ) ; } $ statusCode = ( int ) curl_getinfo ( $ this -> resource , CURLINFO_HTTP_CODE ) ; return new Response ( $ statusCode , ( string ) $ content ) ; }
{@inheritdoc}

@throws HttpSenderException
{ @inheritdoc }