First time using cURL and guzzle. This is probably a simple question but would appreciate a "helloworld" example.
This is the cURL I currently have:
curl --include --request POST \
--header "application/x-www-form-urlencoded" \
--header "X-Access-Token: ACCESS_TOKEN" \
--data-binary "grant_type=client_credentials&client_id=PUBLIC_KEY&client_secret=PRIVATE_KEY" \
'https://api.url.com/token'
And this is the guzzle code:
$client = new Client(); //GuzzleHttp\Client
$result = $client->post('https://api.url.com/token', [
'form_params' => [
'sample-form-data' => 'value'
]
]);
I'm not sure how to run the cURL command using guzzle. How would the resulting guzzle code look like?