I am trying to make an async
guzzle call to 2 other APIs running on the same server. This way I just want to combine the 2 API calls running concurrently.
$params = []
$client = new Client(['base_uri' => 'https://test.local', 'cookies' => true]);
$promises = [
'first' => $client->requestAsync($method, '/api/first', ['form_params' => $params]),
'second' => $client->requestAsync($method, '/api/second', ['form_params' => $params]),
];
$responses = Utils::unwrap($promises);
But everytime I run this throws SSL certificate error
Error: cURL error 60: SSL certificate problem: self-signed certificate
This must be because of the same domains Client/Server.
Tried with tricking different domain name then working.
Note: The
certificate.pem
is installed and integrated inphp.ini
file. the SSL all working for other straight-forward calls. just not working for this particular case.curl.cainfo = "C:\laragon\etc\ssl\cacert.pem"
in php.ini