AirVisual

KOSTENLOS
Durch Denis Raygorodskij | Aktualisiert 14 days ago | Transportation
Popularität

5 / 10

Latenz

127,257ms

Service Level

0%

Health Check

N/A

Zurück zu allen Diskussionen

Getting...Syntax error. Incorrect input JSON

Rapid account: T 5825 Db
t5825db
4 years ago

Tried to use getNearestCity and I’m getting this…any ideas?

------ Response Body ------
“callback”:“error”
“contextWrites”:{1 item
"to":{2 items
"status_code":“JSON_VALIDATION”
“status_msg”:“Syntax error. Incorrect input JSON. Please, check fields with JSON input.”

------ CODE SNIPPET ------
var unirest = require(“unirest”);

var req = unirest(“POST”, “https://airvisualraygorodskijv1.p.rapidapi.com/getNearestCity”);

req.headers({
“x-rapidapi-host”: “AirVisualraygorodskijV1.p.rapidapi.com”,
“x-rapidapi-key”: “439d0653b1mshadd98df2303d7c4p107cf6jsn3e634840e909”,
“content-type”: “application/x-www-form-urlencoded”
});

req.form({});

req.end(function (res) {
if (res.error) throw new Error(res.error);

console.log(res.body);

});

------ TEST RESULT------

General
Status Code: 200
Request URL: https://AirVisualraygorodskijV1.p.rapidapi.com/getNearestCity
Request Method: POST

Response Headers
"cache-control": “no-store, no-cache, must-revalidate”
“content-type”: "application/json;charset=utf-8"
“date”: “Tue, 29 Oct 2019 11:13:51 GMT”
“expires”: “Thu, 19 Nov 1981 08:52:00 GMT”
“pragma”: “no-cache”
“server”: "RapidAPI-1.0.31"
“set-cookie”: “PHPSESSID=uiatm95c665ah0jup8v7deqm36; path=/”
“x-rapidapi-region”: "AWS - eu-central-1"
“x-rapidapi-version”: "1.0.31"
“content-length”: "166"
“connection”: “Close”

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen