public function getBody() {
        if (!isset($this->body)) {
            $contentType = $this->getHeader('Content-Type');

            if (stripos($contentType, 'application/json') !== false) {
                $this->body = json_decode($this->rawBody, true);
            } else {
                $this->body = $this->rawBody;
            }
        }
        return $this->body;
    }
public function getBody() {
        if (!isset($this->body)) {
            $contentType = $this->getHeader('Content-Type');

            if (stripos($contentType, 'application/json') !== false) {
                $this->body = json_decode($this->rawBody, true);
            } else {
                $this->body = $this->rawBody;
            }
        }
        return $this->body;
    }
public function getBody ( ) { if ( ! isset ( $ this -> body ) ) { $ contentType = $ this -> getHeader ( 'Content-Type' ) ; if ( stripos ( $ contentType , 'application/json' ) !== false ) { $ this -> body = json_decode ( $ this -> rawBody , true ) ; } else { $ this -> body = $ this -> rawBody ; } } return $ this -> body ; }
Gets the body of the response, decoded according to its content type.

@return mixed Returns the http response body, decoded according to its content type.
Gets the body of the response decoded according to its content type .