Weather App Securty Problem HTTPS

I just finished the weather app. and I post it on code pen, but it didn’t work there. It was working on my laptop. I check the console and it turned out that the site that I used it doesn’t support https.
Should I do another App?
Or it is OK as long as it is working without https?

It would be ok in 2015.
Now all browser vendors are forcing https everywhere. So in 2017 I would say your project must work via https.

One solution is to prefix the url you are calling with so it looks like this:

But it’s not a real solution, just a hack.

Thank you for your comment!
Worked partially on my laptop, but not on code pen.
Here is what I did:
weather = new XMLHttpRequest();
var x = “” + sta + ‘/’ + “.json”;
var y = “”;
var url= y + x;