nodejs express项目中如何同时获取raw body和解析好的body
时间:2015-08-07 08:12:47
收藏:0
阅读:782
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
评论(0)