I am trying to make an API call to Openweathermap using their API+key. I am unable to parse the data to a CSS ID using $.getJSON in Javascript.
This is the jsfiddle: https://jsfiddle.net/n1Lz3vf0/
Code:
var weatherData = "http://api.openweathermap.org/data/2.5/weather?
q=Endicott,us&appid=API+KEY";
$.getJSON(weatherData, function(data){
var town = data.name;
document.getElementById('town').innerHTML = town;
});
And it outputs to a simple div tag
Obviously the end result will be far more involved and I will be parsing much more data, but in the jsfiddle, it should simply output my city name but it's not.
Mixed Content: The page at 'https://jsfiddle.net/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint. This request has been blocked; the content must be served over HTTPS.