Weather by API-Ninjas

免费增值
通过 API Ninjas Team | 已更新 vor einem Monat | Weather
人气

9.8 / 10

延迟

654ms

服务等级

100%

Health Check

N/A

返回所有讨论

Use this JS code. This code will work.

Rapid account: Saurabh 45
Saurabh45
vor einem Jahr

const url = ‘https://weather-by-api-ninjas.p.rapidapi.com/v1/weather?city=Lucknow’;
const options = {
method: ‘GET’,
headers: {
‘content-type’: ‘application/octet-stream’,
‘X-RapidAPI-Key’: ‘763c810bdfmshb9f4669b80c3925p18d818jsn3db5be365864’,
‘X-RapidAPI-Host’: ‘weather-by-api-ninjas.p.rapidapi.com
}
};

fetch(url, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

Rapid account: Jayeshjagtap 2711
jayeshjagtap2711 Commented vor 4 Monaten

Thanks brother code is really working

Rapid account: Zinmazh
zinmazh Commented vor 5 Monaten

thanks a lot,it did work perfectly

Rapid account: Rakhattri
Rakhattri Commented vor 10 Monaten

Thanks man, your code did the job for me.

Rapid account: Aniketk 8600
aniketk8600 Commented vor einem Jahr

Your code is working fine thanks!, But when i m using code snippet of js fetch it showed error why?

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论