src/Protocol/Http/Sender/CurlHttpSender.php
private function prepareCurlResourceByRequest(Request $request): void
    {
        curl_setopt($this->resource, CURLOPT_URL, $request->getUrl());
        curl_setopt($this->resource, CURLOPT_POSTFIELDS, $request->getContent());

        if ($request->getCertificate()) {
            curl_setopt($this->resource, CURLOPT_SSLCERT, $request->getCertificate());
            curl_setopt($this->resource, CURLOPT_SSLCERTPASSWD, $request->getCertificatePassPhrase());
        }

        $inlineHeaders = [];

        foreach ($request->getHeaders() as $name => $value) {
            $inlineHeaders[] = sprintf('%s: %s', $name, $value);
        }

        curl_setopt($this->resource, CURLOPT_HTTPHEADER, $inlineHeaders);
    }
private function prepareCurlResourceByRequest(Request $request): void
    {
        curl_setopt($this->resource, CURLOPT_URL, $request->getUrl());
        curl_setopt($this->resource, CURLOPT_POSTFIELDS, $request->getContent());

        if ($request->getCertificate()) {
            curl_setopt($this->resource, CURLOPT_SSLCERT, $request->getCertificate());
            curl_setopt($this->resource, CURLOPT_SSLCERTPASSWD, $request->getCertificatePassPhrase());
        }

        $inlineHeaders = [];

        foreach ($request->getHeaders() as $name => $value) {
            $inlineHeaders[] = sprintf('%s: %s', $name, $value);
        }

        curl_setopt($this->resource, CURLOPT_HTTPHEADER, $inlineHeaders);
    }
private function prepareCurlResourceByRequest ( Request $ request ) : void { curl_setopt ( $ this -> resource , CURLOPT_URL , $ request -> getUrl ( ) ) ; curl_setopt ( $ this -> resource , CURLOPT_POSTFIELDS , $ request -> getContent ( ) ) ; if ( $ request -> getCertificate ( ) ) { curl_setopt ( $ this -> resource , CURLOPT_SSLCERT , $ request -> getCertificate ( ) ) ; curl_setopt ( $ this -> resource , CURLOPT_SSLCERTPASSWD , $ request -> getCertificatePassPhrase ( ) ) ; } $ inlineHeaders = [ ] ; foreach ( $ request -> getHeaders ( ) as $ name => $ value ) { $ inlineHeaders [ ] = sprintf ( '%s: %s' , $ name , $ value ) ; } curl_setopt ( $ this -> resource , CURLOPT_HTTPHEADER , $ inlineHeaders ) ; }
Prepare cURL resource by request

@param Request $request
Prepare cURL resource by request