public function sendRequest(
        RequestContext $requestContext
    ): ResponseContextAbstract {
        $curlHandle = $this->curlHelper->getRequestHandle($requestContext);

        $responseContext = $requestContext->getResponseContextObject();

        list(
            'httpStatus'    => $status,
            'response'      => $content,
            'headers'       => $headers
        ) = $this->curlHelper->executeRequestHandle($curlHandle);

        $responseContext->setRequestContext($requestContext)
            ->setHttpStatusCode((int)$status);

        if ($content) {
            $responseContext->setContent($content);
        }

        $responseContext->headers()->setHeadersFromString($headers);

        return $responseContext;
    }
public function sendRequest(
        RequestContext $requestContext
    ): ResponseContextAbstract {
        $curlHandle = $this->curlHelper->getRequestHandle($requestContext);

        $responseContext = $requestContext->getResponseContextObject();

        list(
            'httpStatus'    => $status,
            'response'      => $content,
            'headers'       => $headers
        ) = $this->curlHelper->executeRequestHandle($curlHandle);

        $responseContext->setRequestContext($requestContext)
            ->setHttpStatusCode((int)$status);

        if ($content) {
            $responseContext->setContent($content);
        }

        $responseContext->headers()->setHeadersFromString($headers);

        return $responseContext;
    }
public function sendRequest ( RequestContext $ requestContext ) : ResponseContextAbstract { $ curlHandle = $ this -> curlHelper -> getRequestHandle ( $ requestContext ) ; $ responseContext = $ requestContext -> getResponseContextObject ( ) ; list ( 'httpStatus' => $ status , 'response' => $ content , 'headers' => $ headers ) = $ this -> curlHelper -> executeRequestHandle ( $ curlHandle ) ; $ responseContext -> setRequestContext ( $ requestContext ) -> setHttpStatusCode ( ( int ) $ status ) ; if ( $ content ) { $ responseContext -> setContent ( $ content ) ; } $ responseContext -> headers ( ) -> setHeadersFromString ( $ headers ) ; return $ responseContext ; }
Send previously prepared request

@param RequestContext $requestContext

@throws TransportException
@throws ResponseContextException

@return ResponseContextAbstract
Send previously prepared request