标签:
http post 请求 http://127.0.0.1:xxxx/instorePhoto
需要
var bodyParser = require(‘body-parser‘);
app.use(bodyParser.urlencoded({ extended: false }));
router.post("/instorePhoto", function(req, res){
console.log(req.body);
});
http get请求http://127.0.0.1:xxxx/employees
router.get("/employees",function(req,res){
console.log(req.query);
})
http get请求http://127.0.0.1:xxxx/employees/2
router.get("/employees/:id",function(req,res){
console.log(req.params);
})
标签:
原文地址:http://my.oschina.net/ickewolf/blog/509624