Top "Guzzle" questions

Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.

How can I use Guzzle to send a POST request in JSON?

Does anybody know the correct way to post JSON using Guzzle? $request = $this->client->post(self::URL_REGISTER,…

php postman guzzle
Handle Guzzle exception and get HTTP body

I would like to handle errors from Guzzle when the server returns 4xx and 5xx status codes. I make a …

php guzzle
PHP GuzzleHttp. How to make a post request with params?

How to make a post request with GuzzleHttp( version 5.0 ). I am trying to do the following: $client = new \GuzzleHttp\Client(); $…

php request httpclient guzzle
Catching exceptions from Guzzle

I'm trying to catch exceptions from a set of tests I'm running on an API I'm developing and I'm using …

php api functional-testing guzzle
Guzzlehttp - How get the body of a response from Guzzle 6?

I'm trying to write a wrapper around an api my company is developing. It's restful, and using Postman I can …

php response guzzle guzzle6
Guzzle 6: no more json() method for responses

Previously in Guzzle 5.3: $response = $client->get('http://httpbin.org/get'); $array = $response->json(); // Yoohoo var_dump($array[0]['origin']); …

php guzzle
cURL request in Laravel

I am struggling to make this cURL request in Laravel curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: …

php laravel curl guzzle
How to ignore invalid SSL certificate errors in Guzzle 5

This should be an easy thing to do. I can find plenty of references to how to do it in …

php ssl curl guzzle
How do I do HTTP basic authentication using Guzzle?

I want to do basic access authentication using Guzzle and I am very new to programming. I have no clue …

php http basic-authentication guzzle
How to set default header in Guzzle?

$baseUrl = 'http://foo'; $config = array(); $client = new Guzzle\Http\Client($baseUrl, $config); What's the new way to set the default …

php guzzle