Feb 25, 2020
0
Level 1
Laravel API - Guzzle Error
Hello people,
I tried to follow a tutorial for an application with Laravel. In this app, I need to load datas from an API. I do this in my api.php file
Route::get('/weather', function(){
$response = Zttp::get('https://api.darksky.net/forecast/mykey/37.8267,-122.4233');
return $response->json();
});
Then I call it :
methods: {
fetchData(){
fetch(`api/weather`)
.then(response => response.json())
.then(data => {
console.log(data)
})
}
}
Problem is, i got this error :
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
When I looked for this problems I saw lot of solutions there, but they didn't worked for me. So I'm asking if you have an idea about how to handle this error.
Thank you by advance !
Please or to participate in this conversation.