Weather by API-Ninjas

FREEMIUM
Por API Ninjas Team | Atualizado לפני חודש | Weather
Popularidade

9.8 / 10

Latência

654ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

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: Jayeshjagtap 2711
jayeshjagtap2711 Commented לפני 4 חודשים

Thanks brother code is really working

Rapid account: Zinmazh
zinmazh Commented לפני 5 חודשים

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?

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários