I'm trying to POST
data to a remote AWS API.
The data should be a JSON
on the body
part.
Using Postman, I can send the data and everything works correctly :
Now, trying to do so using GuzzleHttp\Psr7\Request
, I'm doing :
$request = new \GuzzleHttp\Psr7\Request(
'POST',
'AWS API URL',
['Host' => 'AWS HOST', 'body' => '{"json": "my JSON"}']
);
$request = $signer->signRequest($request, $credentials);
$response = $client->send($request);
The request succeed, but there is no data update ! As if the 'body'
is not received.
I have no access to the remote API log files.
So my question, is this the correct way to post data in body part of a Guzzle request ?
Thanks.