Weather by API-Ninjas

FREEMIUM
Par API Ninjas Team | Mise à jour vor 2 Monaten | Weather
Popularité

9.8 / 10

Latence

645ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

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: Rahulsalve 071
rahulsalve071 Commented vor 3 Tagen

Thanks bro this cobe will be run

Rapid account: Jayeshjagtap 2711
jayeshjagtap2711 Commented vor 5 Monaten

Thanks brother code is really working

Rapid account: Zinmazh
zinmazh Commented vor 6 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?

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires