Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2017 09:25 AM
Hi
I am trying to create a new ticket to servicenow by sending a POST request from my NodeJS application.
Initially I wrote the below code:
var request = require('request');
request.post(
'https://MYINSTANCE.service-now.com/api/now/v1/table/incident',
{ json: { key: 'value' } },
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body)
}
else {
console.log("error")
}
}
);
This returns an html instead of a JSON. What am I missing?
Solved! Go to Solution.
Labels:
- Labels:
-
Team Development