guzzlehttp post json example

Solutions on MaxInterview for guzzlehttp post json example by the best coders in the world

showing results for - "guzzlehttp post json example"
Hassan
16 Jun 2020
1use GuzzleHttp\Client;
2
3$client = new Client();
4
5$response = $client->post('url', [
6    GuzzleHttp\RequestOptions::JSON => ['foo' => 'bar'] // or 'json' => [...]
7]);