public function EasyRdf_Http_Response::getBody

Get the response body as string

Return value

string

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php, line 166

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;
  }
}