View Single Post
Posts: 284 | Thanked: 661 times | Joined on Aug 2013 @ Finland
#106
Found from here: https://openweathermap.org/forecast5#call

Code:
api.openweathermap.org/data/2.5/forecast?zip={zip code},{country code}&appid={your api key}
so you can contstruct your url as per my previous suggestion.

EDIT: I had to check, but XMLHttpRequest doesn't allow cross-site requests, so it wont work without modifications. With a short look, it seems there's CORS and JSONP to circumvent the restriction, but I don't know if they're supported on SFOS, and this is also something I have no experience implementing.

I would try it anyways, though. Maybe there's no restrictions when using it when you are not actually doing this js stuff with a browser attached.

Last edited by Thoke; 2020-08-24 at 18:12.
 

The Following 2 Users Say Thank You to Thoke For This Useful Post: