php convert guzzle response to json
snippet in php

php convert guzzle response to json

user3692

$response = GuzzleHttp\get('http://httpbin.org/get');
if ($response->getBody()) {
    echo $response->getBody();
    // JSON string: { ... }
}