public function body($parser = null)
    {
        deprecationWarning(
            'Response::body() is deprecated. Use getStringBody()/getJson()/getXml() instead.'
        );

        $stream = $this->stream;
        $stream->rewind();
        if ($parser) {
            return $parser($stream->getContents());
        }

        return $stream->getContents();
    }
public function body($parser = null)
    {
        deprecationWarning(
            'Response::body() is deprecated. Use getStringBody()/getJson()/getXml() instead.'
        );

        $stream = $this->stream;
        $stream->rewind();
        if ($parser) {
            return $parser($stream->getContents());
        }

        return $stream->getContents();
    }
public function body ( $ parser = null ) { deprecationWarning ( 'Response::body() is deprecated. Use getStringBody()/getJson()/getXml() instead.' ) ; $ stream = $ this -> stream ; $ stream -> rewind ( ) ; if ( $ parser ) { return $ parser ( $ stream -> getContents ( ) ) ; } return $ stream -> getContents ( ) ; }
Get the response body.

By passing in a $parser callable, you can get the decoded
response content back.

For example to get the json data as an object:

```
$body = $response->body('json_decode');
```

@param callable|null $parser The callback to use to decode
the response body.
@return mixed The response body.
@deprecated 3.7.0 Use getStringBody()/getJson()/getXml() instead.
Get the response body .