Files
meteo-vue/apitests/openweather.http

21 lines
566 B
HTTP

### GET Geo Position
@city_name = Rivanazzano Terme
@country_code = IT
@limit = 2
GET http://api.openweathermap.org/geo/1.0/direct?q={{city_name}},{{country_code}}&limit={{limit}}&
appid={{apikey}}
Accept: application/json
> {%
client.global.set("geo", response.body[0]);
%}
### GET Forecast
GET api.openweathermap.org/data/2.5/forecast?lat={{geo.lat}}&lon={{geo.lon}}&appid={{apikey}}
Accept: application/json
### GET Now Weather
GET http://api.openweathermap.org/data/2.5/weather?lat={{geo.lat}}&lon={{geo.lon}}&appid={{apikey}}
Accept: application/json