i have a node js api that send file like this
exports.myFunction = function(req, res) {
res.sendFile("path_to_file");
}
and in php i try to read the file received like this :
$client = new GuzzleHttp\Client();
$res = $client->post('http://www.example.com',
['headers' => ['Authorization' => 'Bearer my token',
'content-type' => 'application/json'
],
'body' =>json_encode(['id'=>'5bf7c8cfe58e316de4d3ae89', 'type'=>'default'])
]);
echo $res->getBody();
but i don't get the file, and i get this :
�PNG IHDR���f IDATx��w`U���of��g�zo �(�����O=���,�X���b�Į��N�қT!�PI