var bodyParser = require('body-parser');
const api_url3 = '/query';
//处理json格式请求数据
app.use(bodyParser.json());
app.use(api_url3, (req, res) => { console.log(req.body); });
var bodyParser = require('body-parser');
const api_url3 = '/query';
//处理json格式请求数据
app.use(bodyParser.json());
app.use(api_url3, (req, res) => { console.log(req.body); });
本文标题:nodejs:app.use处理post请求
本文链接:https://www.haomeiwen.com/subject/htwtkctx.html
网友评论