public function EasyRdf_Http_Response::getBody in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php \EasyRdf_Http_Response::getBody()
Get the response body as string
Return value
string
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Http/ Response.php, line 165
Class
- EasyRdf_Http_Response
- Class that represents an HTTP 1.0 / 1.1 response message.
Code
public function getBody() {
// Decode the body if it was transfer-encoded
switch (strtolower($this
->getHeader('transfer-encoding'))) {
// Handle chunked body
case 'chunked':
return self::decodeChunkedBody($this->body);
break;
// No transfer encoding, or unknown encoding extension:
// return body as is
default:
return $this->body;
break;
}
}