GuzzleHttp cURL error 60: SSL certificate problem: self signed certificate

报错问题

GuzzleHttp 发起https请求时,会报以下错误

cURL error 60: SSL certificate problem: self signed certificate

解决方案

guzzle 发起http请求与https请求的区别,发起https请求时,需要在构造函数中传入一个配置项,

$client = new \GuzzleHttp\Client(['verify' =>false]);

猜你喜欢

转载自blog.csdn.net/qq175023117/article/details/107390740