Hi,
I tested the entrypoint which worked fine. Then I copied the code snippet to my Node server code, it returned:
{"success":false,"error":{"code":"invalid_location","description":"The requested location was not found."},"response":[]}
Why does it do that? Am I missing something here?
Regards,
var request = require("request");
var options = {
method: 'GET',
url: 'https://aerisweather1.p.rapidapi.com/forecasts/cairo%252Ceg',
headers: {
'x-rapidapi-host': '...',
'x-rapidapi-key': '...',
useQueryString: true
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Aşağıya yorum ekleyerek tartışmaya katılın:
I found that the problem was with the hex character for comma in url. Works fine now.