Hi,
From reading the documentation on request headers I should be including:
Content-Type: application/json
X-HTTP-Method-Override: GET
But this throws errors. When I use the code generated by Postman, which was successful in logging in, it doesn’t use those headers. In fact, when I include those in my Postman headers, I get a 520 “Illegal request” error. Running code included below. I’m a bit confused about what is happening. Can anyone explain? Thanks
Nathan
options1 = {
method: "GET",
url: "https://zd7vr.kintone.com/k/v1/records.json",
qs: {
app: "1"
},
headers: {
"X-Cybozu-API-token":removed for security
}
}
request.get(options1, (err, res, body) => {
console.log(body);
})