/** * @method parseResponse Parses response from request. * @param string parseResponse * @return HttpRequest_Response_Html */ protected function parseResponse($response) { return HttpRequest_Response_Html::factory()->setBody($response); }
/** * @method parseResponse Parses response from request. * @param string parseResponse * @return HttpRequest_Response_Html */ protected function parseResponse($response) { if ($response) { $curl_info = curl_getinfo($this->handle); if (isset($curl_info['header_size'])) { $header_size = $curl_info['header_size']; $header = substr($response, 0, $header_size); $response = substr($response, $header_size); } else { $header = null; } $response = HttpRequest_Response_Html::factory()->parseResponse($response, $header); } else { $this->error = curl_errno($this->handle) . ' - ' . curl_error($this->handle); } return $response; }