Dear Coders,
I have been working on the weather API last week and when I finished it was working as expected. Today, however, it is not working anymore. And I did not do anything.
I double-checked the code and I cannot find what is the mistake.
It works until the first step: it can get my location data using ipinfo.io API and I can even console.log it.
The problem is on second step, when I use those information to get the weather info from OpenWeather API.
Here’s the link to my CodePen: https://codepen.io/silviojof/pen/MbRKLW
When I type my OpenWeather JSON URL on browser it return the JSON information as expected, as you can check here:
http://api.openweathermap.org/data/2.5/weather?lat=49.2788&lon=-123.1139&appid=4d106b7dacc806ab1627a85359a89724
I would really appreciate your help! Thanks in advance!