connect-cors
connect-cors copied to clipboard
POST request payload
What's the correct way to read POST request payload? I'm using connect-xcors and I can't seem to find where POST payload is stored.
var server = connect.createServer(
connect.logger(),
CORS(options),
connect.bodyParser(), function(req,res) {
var foo = req.body.foo; /* this is where bodyParser() stores the payload */
res.end();
}
)
I first thought it was connect.bodyParser() that was messing with me but removing that didn't solve the issue. All help is appreciated.