Hye everyone
so i'm trying to get weather in a widget but I have this error everytime,
I use the same code as my watchface (which one work perfectly)
but not on my widget.
here is the code, please let me know whaat it is.
Many thanks
function makeRequest(lat, lng,apiKey) {
var UNITS=(Sys.getDeviceSettings().temperatureUnits==Sys.UNIT_STATUTE) ? "imperial" : "metric";
var url ="">api.openweathermap.org/.../weather";
var param={
"lat" => lat,
"lon"=>lng,
"appid"=>apiKey,
"units" => UNITS};
var options = {
:methods => Communications.HTTP_REQUEST_METHOD_GET,
:headers => {"Content-Type" => Communications.REQUEST_CONTENT_TYPE_URL_ENCODED},
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
};
Communications.makeWebRequest(
url,
param,
options,
method(:receiveWeather));
}