Using Laravel 7.6 and it's built-in HTTP Client.
I'm trying to send a simple POST request with body in Raw JSON format to my other domain but no luck:
$response = Http::post('https://example.com', [
'body' => '{ test: 1 }'
]);
I get 400 Bad Request - Client error - because my server expects body as a mandatory.
What am I missing here?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3d3KBbZ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire