Hi wondring whats the difference between $response->getBody() and $response->getRawBody();
$this->_client->setUri('http://www.google.com/ig?hl=en');
try {
$response = $this->_client->request();
}catch(Zend_Http_Exception $e)
{
echo 'Zend http Client Failed';
}
echo get_class($response);
if($response->isSuccessful())
{
$response->getBody();
$response->getRawBody();
}
getRawBody()returns the body of the http response as is.getBody()adjust for certain headers i.e. decompresses content sent with gzip or deflate content-encoding headers. Or the chunked transfer-encoding header.The simplest way figure these questions out in to simply look at the code. Also a great learning experience. Code is edited for brevity.