Hey Steve,
I'd like to offer a potential solution, though I regret to inform, even after nine months, the issue persists. I find myself in the same predicament: Laravel Http client remains non-functional, while Guzzle, utilizing identical parameters, performs as expected. Small difference, this pertains to basic authentication.
I will persist and test, but for the time being, it appears that Guzzle is the solution.
$headers = [
'Content-Type' => 'application/json',
'Authorization'=> 'Basic '.base64_encode('email:token')
];
Laravel Http Client (doesn't work). Also tried the "withBasicAuth" and "acceptJson" options, but the result is the same.
$response = Http::withHeaders($headers)->get("url");
return response()->json($response);
200 Response: {"cookies":{},"transferStats":{}}
Guzzle Client (works)
$client = new GuzzleHttp\Client(['headers' => $headers]);
$response = $client->get("url");
return response(json_decode($response->getBody(), true));
200 Response with expected body
Thanks, Oscar