Это должно быть довольно просто, код ниже работает для меня:
const request = require('request');
const options = {
method: 'GET',
url: 'https://weather.api.here.com/weather/1.0/report.json',
qs: {
app_id: appId, // Put your APP_ID here
app_code: appCode, // Put your APP_CODE here
product: 'observation',
name: 'Berlin' // Put whichever location here
}
}
request(options, (error, response, body) => {
if (error) {
console.error("An error has occurred: ", error);
} else {
console.log("Response body: ", body);
}
});