mardi 8 mars 2016

Laravel : GuzzleHttp Client

I am using "guzzlehttp/guzzle": "~6.0" and trying to github users using below code .

$client = new \GuzzleHttp\Client();

$request = $client->createRequest('GET', 'http://ift.tt/1x4Q6g3');
$query = $request->getQuery();
$query->set('since',135);
$response = $request->send();
$oResponse = json_decode($response->getBody(true));

But I am getting error Argument 3 passed to GuzzleHttp\Client::request() must be of the type array, string given But this method works on "guzzle/guzzle": "^3.9", I don't know where I am missing something.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire