I'm trying to call an external API from my Yii Application
$client = new Client();
$response = $client->createRequest()
->setMethod('POST')
->setUrl('https//externalApi')
->setData(['name' => 'John Doe', 'email' => 'johndoe@example.com'])
->send();
if ($response->isOk) {
var_dump($response);
}
But I get:
HTTP Client Exception: fopen(): Peer certificate CN=`****' did not match expected CN=`****'
I think it's something related to the SSL certificate. Is there a way to ignore the verification ?