private function setResponseState($response, $responseContent, $ch)
    {
        if ($responseContent === false) {
            $this->last_error = curl_error($ch);
        } else {

            $headerSize = $response['headers']['header_size'];

            $response['httpHeaders'] = $this->getHeadersAsArray(substr($responseContent, 0, $headerSize));
            $response['body']        = substr($responseContent, $headerSize);

            if (isset($response['headers']['request_header'])) {
                $this->last_request['headers'] = $response['headers']['request_header'];
            }
        }

        return $response;
    }
private function setResponseState($response, $responseContent, $ch)
    {
        if ($responseContent === false) {
            $this->last_error = curl_error($ch);
        } else {

            $headerSize = $response['headers']['header_size'];

            $response['httpHeaders'] = $this->getHeadersAsArray(substr($responseContent, 0, $headerSize));
            $response['body']        = substr($responseContent, $headerSize);

            if (isset($response['headers']['request_header'])) {
                $this->last_request['headers'] = $response['headers']['request_header'];
            }
        }

        return $response;
    }
private function setResponseState ( $ response , $ responseContent , $ ch ) { if ( $ responseContent === false ) { $ this -> last_error = curl_error ( $ ch ) ; } else { $ headerSize = $ response [ 'headers' ] [ 'header_size' ] ; $ response [ 'httpHeaders' ] = $ this -> getHeadersAsArray ( substr ( $ responseContent , 0 , $ headerSize ) ) ; $ response [ 'body' ] = substr ( $ responseContent , $ headerSize ) ; if ( isset ( $ response [ 'headers' ] [ 'request_header' ] ) ) { $ this -> last_request [ 'headers' ] = $ response [ 'headers' ] [ 'request_header' ] ; } } return $ response ; }
Do post-request formatting and setting state from the response

@param array    $response        The response from the curl request
@param string   $responseContent The body of the response from the curl request
@param resource $ch              The curl resource

@return array    The modified response
Do post - request formatting and setting state from the response