guzzle response code example
Example 1: php convert guzzle response to json
$response = GuzzleHttp\get('http://httpbin.org/get');
if ($response->getBody()) {
echo $response->getBody();
// JSON string: { ... }
}
Example 2: guzzle response
$contents = (string) $response->getBody();