AirVisual

免费
通过 Denis Raygorodskij | 已更新 17日前 | Transportation
人气

2.9 / 10

延迟

127,257ms

服务等级

0%

Health Check

N/A

返回所有讨论

Getting...Syntax error. Incorrect input JSON

Rapid account: T 5825 Db
t5825db
4年前

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”

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论