Weather by API-Ninjas

फ्रीमियम
द्वारा API Ninjas Team | अपडेट किया गया vor einem Monat | Weather
लोकप्रियता

9.8 / 10

लेटेंसी

654ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Solved Error "Syntax Error"

Rapid account: Aayush 9119
aayush9119
vor einem Jahr

// Use this one.

onst 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: Aellysijapati 12
aellysijapati12 Commented vor einem Jahr

just need to use " " double quote instead of ’ ’ one then it works perfectly

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें