jagadish
jagadish

Reputation: 301

Laravel - GuzzleHttp Client throwing cURL error 35: Unknown SSL protocol error in connection

use GuzzleHttp\Client;

try {    
    $this->client = new Client(['base_uri'=>'']);  
    $responseData = $this->client->request('URL',[
        'verify'  => false,
        'headers' => [
            'Accept'       => 'application/json',
            'Content-Type' => 'application/json',
            ],  
    ]);
} catch (\Exception $ex) {
    echo $ex->getMessage()." ".$ex->getLine()." ".$ex->getFile();
}

cURL error 35: Unknown SSL protocol error in connection (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) 186 /var/www/api/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

Upvotes: 5

Views: 11053

Answers (1)

Alexey Shokov
Alexey Shokov

Reputation: 5010

There are many similar questions already. Try to debug it with curl console command and this article, because there is not one reason for the error (the error is general).

Upvotes: 1

Related Questions