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

it2022-05-08  8

 

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

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

 

 

 

路由中使用

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

    req.body.labelname

}

 

转载于:https://www.cnblogs.com/xfbx/p/9343930.html


最新回复(0)