nodejs 使用 body-parser 获取网页内容

var bodyParser = require('body-parser');

var urlencodedParser = bodyParser.urlencoded({
extended: false
});

路由中使用

router.post('/', urlencodedParser, function (req, res) {

    req.body.labelname

}

猜你喜欢

转载自www.cnblogs.com/xfbx/p/9343930.html