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

Solved Error "Syntax Error"

Rapid account: Aayush 9119
aayush9119
일 년 전

// 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 일 년 전

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

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

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