If i use:
Thing http:url:yandexWeather "yandexWeather" [
baseURL="https://api.weather.yandex.ru/v2/informers?lat=43.59144&lon=39.72804&lang=en_US",
headers="X-Yandex-API-Key=xxxxxxxxxxxxxxx",
refresh=60]
Got error:
Requesting 'https://api.weather.yandex.ru/v2/informers?lat=43.59144&lon=39.72804&lang=en_US' (method='GET', content='null') failed: 403 Forbidden
If i use rules - works ok:
val headers = newHashMap("X-Yandex-API-Key" -> "xxxxxxxxxxxxx")
val output = sendHttpGetRequest("https://api.weather.yandex.ru/v2/informers?lat=43.59144&lon=39.72804&lang=en_US", headers, 1000)
{"now":1631361158,"now_dt":"2021-09-11T11:52:38.214470Z","info":{"url":"https://yandex.ru/pogoda/239?lat=43.59144\u0026lon=39.72804","lat":43.59144,"lon":39.72804},"fact":{"obs_time":1631358000,"temp":20,"feels_like":22,"temp_water":25,"icon":"ovc_ra","condition":"rain","wind_speed":1.5,"wind_dir":"nw","pressure_mm":755,"pressure_pa":1006,"humidity":87,"daytime":"d","polar":false,"season":"autumn","wind_gust":5.4},"forecast":{"date":"2021-09-11","date_ts":1631307600,"week":36,"sunrise":"05:55","sunset":"18:39","moon_code":10,"moon_text":"moon-code-10","parts":[{"part_name":"evening","temp_min":19,"temp_avg":19,"temp_max":20,"temp_water":25,"wind_speed":1.5,"wind_gust":6.2,"wind_dir":"se","pressure_mm":755,"pressure_pa":1006,"humidity":88,"prec_mm":2.4,"prec_prob":80,"prec_period":360,"icon":"ovc_-ra","condition":"light-rain","feels_like":20,"daytime":"n","polar":false},{"part_name":"night","temp_min":19,"temp_avg":19,"temp_max":20,"temp_water":25,"wind_speed":1.8,"wind_gust":6.1,"wind_dir":"e","pressure_mm":755,"pressure_pa":1006,"humidity":84,"prec_mm":3.3,"prec_prob":60,"prec_period":360,"icon":"ovc_ra","condition":"rain","feels_like":20,"daytime":"n","polar":false}]}}