I am using nodejs + Express (v3) like this:
app.use(express.bodyParser());
app.route(\'/some/route\', function(req, res) {
var text = req.body; // I expect
I did it:
router.route('/')
.post(function(req,res){
var chunk = '';
req.on('data', function(data){
chunk += data; // here you get your raw data.
})
req.on('end', function(){
console.log(chunk); //just show in console
})
res.send(null);
})
Make sure the version of express and bodyParser has been upgraded to the appropriate versions. Express ˜4.x and bodyParser ˜1.18.x. That should do it. With that in place the following should work
app.use(bodyParser.text());