search

Home  >  Q&A  >  body text

laravel - Guzzle, PHP HTTP client sends https request and reports error

Using Guzzle in laravel5, how to send HTTPS request with PHP HTTP client https://github.com/guzzle/guzzle
Error when sending post request
cURL error 60: See http://curl.haxx. se/libcurl/c...
CURLE_SSL_CACERT (60)
Peer certificate cannot be authenticated with known CA certificates.

巴扎黑巴扎黑2827 days ago1249

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-05-16 13:10:58

    $client->setDefaultOption('verify', false);

    or

    # 证书 https://github.com/guzzle/guzzle/blob/4.2.3/src/cacert.pem
    $client = new \GuzzleHttp\Client(['verify' => '/full/path/to/cert.pem']);

    reply
    0
  • Cancelreply