When accessing a website in the browser, I use:
xmlHttp.open("POST", "/", true); // true for asynchronous
xmlHttp.send("data");
on the client side browser.
For node js application, I'm using:
app.post("/", function (req, res) {
console.log("Got a POST request");
console.log(req);
});
to receive post data. However, no matter what data I send, it doesn't display. It's frustrating that I have to install additional "body parser" package just to view data without parsing it. A post request is supposed to send data to the server... Where did the data go?