I’m currently working on the local weather project in the intermediate front end section an have made an API call to get some JSON data. I know the code is working correctly as I have shared my pen with other campers who have run it and received data. However when I try this I do not receive any data. I have tried 2 browsers but had the same problem. Has anyone heard of this kind of issue?
Here is my pen:
When it is run, the data should appear in the console.
However when I shared the pen with other people they could receive the data.
Either way, do you know any way around this? I have an api key which i got from openweathermap.org
Now, Your variable should look like: var api = 'https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=d1dbbbdcb93dbf2b6360c25c5291fa87'