lundi 9 décembre 2019

Laravel GuzzleHttp response empty

I'm trying to retrieve the value of a URL but it returns a null response. Not sure what I'm doing wrong I've been trying to retrieve the value but I get an empty value. Below is my code

$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://fantasy.premierleague.com/api/bootstrap-static/');

dd($response->getBody()->getContents());

When trying to dump the response I get the below response

enter image description here

When trying to read the getBody() of the response I get this output

enter image description here

I'm using guzzle "guzzlehttp/guzzle": "^6.4"



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire