php convert guzzle response to json

54

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

Comments

Submit
0 Comments