I have built my Weather app using the Dark Sky API and and the link works perfectly: when I open it into a web page it gives me the requested data. However, when I type in console.log(data); to test the $.getJSON(URL, function(data) nothing happens, I get no data in my console! I don’t know why that’s happening and I would be very grateful if someone could help. Thank you in advance!
try https://crossorigin.me add it in front of your current link
takes long but it works)
It works! Thank you so much, I’ve been struggling with this for some time now Can you please explain what you did with the https://crossorigin.me/ part? What’s that and what does it change? Thanks again!
It works! Thank you so much, I’ve been struggling with this for some time now Can you please explain what you did with the https://crossorigin.me/ part? What’s that and what does it change? Thanks again!
Can imagine lol i’ve been there… desperate!)) check you browser console without crossorigin.me, theres an error, check this and this article in codepen blog, another article, crossorigin.me sets correct header as far as i understoood (Access-Control-Allow-Origin: * instead of Access-Control-Allow-Origin: ‘https://s.codepen.io’ to allow cross-origin requests).
Btw , Dark Sky default temperature is in F, you name it C and convert to F