Whenever a request is made with optional parameters, it gives JSON_VALIDATION error in Test Endpoint part of site.
e.g
unirest.post(“https://CoinMarketCapzakutynskyV1.p.rapidapi.com/getCryptocurrency”)
.header(“X-RapidAPI-Key”, “bd7b5b28ebmsh47b39e1a512dc68p1ba46ajsnf782cac77767”)
.header(“Content-Type”, “application/x-www-form-urlencoded”)
.send(“id=bitcoin”)
.end(function (result) {
console.log(result.status, result.headers, result.body);
});
{2 items
"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.”
}
}
}
Participez à la discussion - ajoutez un commentaire ci-dessous:
+1