OpenWeather App Https JSON Request Security Issues

OpenWeather App Https JSON Request Security Issues
0

#1

I’m working on the weather app, but codepen is giving me constant errors depending on the situation when trying to pull data from OpenWeather API relating to HTTPS connections when trying to use $.getJSON.

  1. When I go to https://codepen and call openweather with https, I get “Failed to load resource: net::ERR_CONNECTION_REFUSED”

  2. When I go to non https codepen and call openweather with https, I get “getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See [Google Link] for more details.”

  3. When I go to https://codepen and call openweather with non https, I get “GET [Codepen Boomerang URL] 404 ()”

I read basically every SO question I could find, and none of them were able to help me. The URL that I’m working with gives me the JSON I want when pasted into the browser. I’m using Chrome 55 (64 Bit). Any help will be greatly appreciated.

EDIT: https://codepen.io/trickspades/pen/pNBGYE


#2

Okay it turns out OpenWeather is ass. When I switched to forecast.io, I got it working in less than 20min. I also didn’t have to convert the temp from Kelvin :slight_smile: