protected function parseResponse($channel, $content)
    {
        $headerSize = curl_getinfo($channel, CURLINFO_HEADER_SIZE);
        $statusCode = curl_getinfo($channel, CURLINFO_HTTP_CODE);
        $responseBody = substr($content, $headerSize);
        $responseHeaders = substr($content, 0, $headerSize);
        $responseHeaders = explode("\n", $responseHeaders);
        $responseHeaders = array_map('trim', $responseHeaders);

        return new Response($statusCode, $responseBody, $responseHeaders);
    }
protected function parseResponse($channel, $content)
    {
        $headerSize = curl_getinfo($channel, CURLINFO_HEADER_SIZE);
        $statusCode = curl_getinfo($channel, CURLINFO_HTTP_CODE);
        $responseBody = substr($content, $headerSize);
        $responseHeaders = substr($content, 0, $headerSize);
        $responseHeaders = explode("\n", $responseHeaders);
        $responseHeaders = array_map('trim', $responseHeaders);

        return new Response($statusCode, $responseBody, $responseHeaders);
    }
protected function parseResponse ( $ channel , $ content ) { $ headerSize = curl_getinfo ( $ channel , CURLINFO_HEADER_SIZE ) ; $ statusCode = curl_getinfo ( $ channel , CURLINFO_HTTP_CODE ) ; $ responseBody = substr ( $ content , $ headerSize ) ; $ responseHeaders = substr ( $ content , 0 , $ headerSize ) ; $ responseHeaders = explode ( "\n" , $ responseHeaders ) ; $ responseHeaders = array_map ( 'trim' , $ responseHeaders ) ; return new Response ( $ statusCode , $ responseBody , $ responseHeaders ) ; }
Prepare response object

@param resource $channel  the curl resource
@param string   $content

@return Response object
Prepare response object