public function parse(CurlResponse $curlResponse)
    {
        $responseBody = $curlResponse->getBody();

        $contentType = $curlResponse->info()->getContentType();
        $responseType = $this->getResponseType($contentType);
        $responseCharset = $this->getResponseCharset($contentType);

        $httpCode = $curlResponse->info()->getHttpCode();
        $httpMessage = $this->responseCodes->getMessage($httpCode);

        return new Response($responseBody, $responseType, $responseCharset, $httpCode, $httpMessage);
    }
public function parse(CurlResponse $curlResponse)
    {
        $responseBody = $curlResponse->getBody();

        $contentType = $curlResponse->info()->getContentType();
        $responseType = $this->getResponseType($contentType);
        $responseCharset = $this->getResponseCharset($contentType);

        $httpCode = $curlResponse->info()->getHttpCode();
        $httpMessage = $this->responseCodes->getMessage($httpCode);

        return new Response($responseBody, $responseType, $responseCharset, $httpCode, $httpMessage);
    }
public function parse ( CurlResponse $ curlResponse ) { $ responseBody = $ curlResponse -> getBody ( ) ; $ contentType = $ curlResponse -> info ( ) -> getContentType ( ) ; $ responseType = $ this -> getResponseType ( $ contentType ) ; $ responseCharset = $ this -> getResponseCharset ( $ contentType ) ; $ httpCode = $ curlResponse -> info ( ) -> getHttpCode ( ) ; $ httpMessage = $ this -> responseCodes -> getMessage ( $ httpCode ) ; return new Response ( $ responseBody , $ responseType , $ responseCharset , $ httpCode , $ httpMessage ) ; }
Convert the Curl response into a Courier response

@param CurlResponse $curlResponse

@return Response
Convert the Curl response into a Courier response