Answer the question
In order to leave comments, you need to log in
Why is POST not being sent to Nodejs?
var data = querystring.stringify({
"ID": 0,
"PropertyID": 197688,
"CheckIn" : "2016-01-25",
"CheckOut" : "2016-01-30",
"Renter": {
"FirstName": "Victor",
"LastName": "Smith",
"PrimaryEmail": "[email protected]"
}
});
var options = {
host: url,
path: path,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(data)
}
}
var req = http.request(options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log('BODY: ' + chunk);
});
});
req.write(data);
req.end();
Answer the question
In order to leave comments, you need to log in
Did you try to read the text of the returned error?
The service expects a value parameter from you
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question