src/net/CurlResponse.php
public function fromCurl ($response, $curl)
		{
			$headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
			$this->_body = substr($response, $headerSize);

			$headers = substr($response, 0, $headerSize);
			$headers = str_replace("\r", "", $headers);
			$headers = str_replace("\n\n", "\n", $headers);
			$headers = trim($headers, "\n");
			$this->_headers = explode("\n", $headers);

			return $this;
		}
public function fromCurl ($response, $curl)
		{
			$headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
			$this->_body = substr($response, $headerSize);

			$headers = substr($response, 0, $headerSize);
			$headers = str_replace("\r", "", $headers);
			$headers = str_replace("\n\n", "\n", $headers);
			$headers = trim($headers, "\n");
			$this->_headers = explode("\n", $headers);

			return $this;
		}
public function fromCurl ( $ response , $ curl ) { $ headerSize = curl_getinfo ( $ curl , CURLINFO_HEADER_SIZE ) ; $ this -> _body = substr ( $ response , $ headerSize ) ; $ headers = substr ( $ response , 0 , $ headerSize ) ; $ headers = str_replace ( "\r" , "" , $ headers ) ; $ headers = str_replace ( "\n\n" , "\n" , $ headers ) ; $ headers = trim ( $ headers , "\n" ) ; $ this -> _headers = explode ( "\n" , $ headers ) ; return $ this ; }
Parse response from cURL response. Sets body and headers.

@param $response
@param $curl

@return CurlResponse
Parse response from cURL response . Sets body and headers .