public function getBody()
    {
        if (0 == strlen($this->body) || !$this->bodyEncoded
            || !in_array(strtolower($this->getHeader('content-encoding')), array('gzip', 'deflate'))
        ) {
            return $this->body;

        } else {
            if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) {
                $oldEncoding = mb_internal_encoding();
                mb_internal_encoding('8bit');
            }

            try {
                switch (strtolower($this->getHeader('content-encoding'))) {
                case 'gzip':
                    $decoded = self::decodeGzip($this->body);
                    break;
                case 'deflate':
                    $decoded = self::decodeDeflate($this->body);
                }
            } catch (Exception $e) {
            }

            if (!empty($oldEncoding)) {
                mb_internal_encoding($oldEncoding);
            }
            if (!empty($e)) {
                throw $e;
            }
            return $decoded;
        }
    }
public function getBody()
    {
        if (0 == strlen($this->body) || !$this->bodyEncoded
            || !in_array(strtolower($this->getHeader('content-encoding')), array('gzip', 'deflate'))
        ) {
            return $this->body;

        } else {
            if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) {
                $oldEncoding = mb_internal_encoding();
                mb_internal_encoding('8bit');
            }

            try {
                switch (strtolower($this->getHeader('content-encoding'))) {
                case 'gzip':
                    $decoded = self::decodeGzip($this->body);
                    break;
                case 'deflate':
                    $decoded = self::decodeDeflate($this->body);
                }
            } catch (Exception $e) {
            }

            if (!empty($oldEncoding)) {
                mb_internal_encoding($oldEncoding);
            }
            if (!empty($e)) {
                throw $e;
            }
            return $decoded;
        }
    }
public function getBody ( ) { if ( 0 == strlen ( $ this -> body ) || ! $ this -> bodyEncoded || ! in_array ( strtolower ( $ this -> getHeader ( 'content-encoding' ) ) , array ( 'gzip' , 'deflate' ) ) ) { return $ this -> body ; } else { if ( extension_loaded ( 'mbstring' ) && ( 2 & ini_get ( 'mbstring.func_overload' ) ) ) { $ oldEncoding = mb_internal_encoding ( ) ; mb_internal_encoding ( '8bit' ) ; } try { switch ( strtolower ( $ this -> getHeader ( 'content-encoding' ) ) ) { case 'gzip' : $ decoded = self :: decodeGzip ( $ this -> body ) ; break ; case 'deflate' : $ decoded = self :: decodeDeflate ( $ this -> body ) ; } } catch ( Exception $ e ) { } if ( ! empty ( $ oldEncoding ) ) { mb_internal_encoding ( $ oldEncoding ) ; } if ( ! empty ( $ e ) ) { throw $ e ; } return $ decoded ; } }
Returns the body of the response

@return   string
@throws   HTTP_Request2_Exception if body cannot be decoded
Returns the body of the response