nodejs express项目中如何同时获取raw body和解析好的body
app.use(bodyParser.json({
verify: function (req, res, buf, encoding) {
req.rawBody = buf;
}
}));
app.use(bodyParser.urlencoded({
extended: false,
verify: function (req, res, buf, encoding) {
req.rawBody = buf;
}
}));
文章来自:http://www.cnblogs.com/mariostudio/p/4709684.html