Answers for "guzzle post json header"

PHP
0

guzzlehttp post json example

use GuzzleHttp\Client;

$client = new Client();

$response = $client->post('url', [
    GuzzleHttp\RequestOptions::JSON => ['foo' => 'bar'] // or 'json' => [...]
]);
Posted by: Guest on April-14-2021

Browse Popular Code Answers by Language