1.get 方法
- 通过 req.query 解析出来
2.post 方法
- 1.req.body 解析出来
//bodyParser
app.use(express.urlencoded({ extended: true, limit: '50mb'}));
3. :id
app.post('/get_json/:id', function (req, res) {// 响应块代码})
- req.params 获取
//bodyParser
app.use(express.urlencoded({ extended: true, limit: '50mb'}));
app.post('/get_json/:id', function (req, res) {// 响应块代码})