Weather by API-Ninjas

부분 유료
분류별 API Ninjas Team | 업데이트됨 2달 전 | Weather
인기

9.8 / 10

지연 시간

644ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Use this JS code. This code will work.

Rapid account: Saurabh 45
Saurabh45
일 년 전

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: Rahulsalve 071
rahulsalve071 Commented 3일 전

Thanks bro this cobe will be run

Rapid account: Jayeshjagtap 2711
jayeshjagtap2711 Commented 5달 전

Thanks brother code is really working

Rapid account: Zinmazh
zinmazh Commented 6달 전

thanks a lot,it did work perfectly

Rapid account: Rakhattri
Rakhattri Commented 10달 전

Thanks man, your code did the job for me.

Rapid account: Aniketk 8600
aniketk8600 Commented 일 년 전

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입