antono/connect-cors — Issue #6: POST request payload
Author: kw4n
Created: 2012-01-13 11:26:12+00:00
State: open

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.