(Solved)Stuck on WeatherApp, API issues

I seem to be running around in circles with this API for the WeatherApp. So far I have read the forum for this and looked at the code of others, but for some reason it is not pulling data back to my pen. Can I get some feedback on what I could possibly be missing.

  • I added a proxy, thinking that is it?
  • I am using geoloaction with lat and lon as a variable (does it matter how long the coordinate is)
  • I’ve tried ajax and JSON
  • I’ve tired multiple weather APIs

Thank you.

Calling the URL directly I am getting
Missing required request header. Must specify one of: origin,x-requested-with
Did you use the proxy correctly?

As well as what @camperextraordinaire said, changing the api call to https:// works:

I’ve changed url to include the ‘s’ and removed the proxy, but am still getting nothing.

ahh, hmm, so new to this, how/where would I add that?

That’s perfect thank you so much. I am going to revisit those right now. See if I can figure it out and I just am having brain over load right now from banging my head over this API stuff. Thank you so much. I’ll let you know once I figure it out (hopefully without looking at your blurred out section).

Thank you again Randell, I just looked at “Write Reusable JavaScript with Functions” under the JS and had an ‘ahh ha’ moment. I didn’t even need to look at the blurred out answer you provided. The API is now pulling the information I need. Thank you thank you.