I was following the documentation of Guzzle and got stuck on json response. This is my code
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('http://httpbin.org/get');
$json = $response->json();
var_dump($json[0]['origin']);
When I run this file I get the error
Notice: Undefined offset: 0 in C:\xampp\htdocs\guzzle\config.php on line 8
NULL
Why am I getting undefined offset?