I am trying to learn HTTP Client of Laravel 7 and I got stuck. I want to send a XML to an endpoint but I can't find any documentation (https://laravel.com/docs/7.x/http-client#introduction). As I understand the default behavior is JSON.
Here is my code:
$headers = [ .. ]; $xml = ... // Valid XML created with DOMDocument Http::withHeaders($headers)->post('https://test.com/', $xml );
Also the response is XML.
Is this doable with the Http client or shall I use guzzle?
Thanks in advance, Ilias