I found this solution: https://github.com/guzzle/guzzle/issues/1935#issuecomment-629548739
Use 'verify => false'
$client = new Client([
'base_uri' => 'https://api.target'
'verify' => false, //https://github.com/guzzle/guzzle/issues/1935#issuecomment-629548739
'headers' => [
//Your header here
]
]);
if you use the http (Illuminate\Support\Facades\Http) https://laravel.com/docs/7.x/http-client#guzzle-options
$response = Http::withOptions([ //use this method
'verify' => false, //This key and value in this method
])->withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
])->get($url);
return $response;