首页 > 其他 > 详细

GET /hello/fred/0926xxx572

时间:2016-02-12 12:47:37      阅读:183      评论:0      收藏:0      [点我收藏+]

GET /hello/fred/0926xxx572

app.get(‘/hello/:name/:tel‘, function(req, res) {
console.log(req.params.name);
console.log(req.params.tel);
});
req.params.xxxxx 从path中的变量
req.query.xxxxx 从get中的?xxxx=中
req.body.xxxxx 从post中的变量

GET /hello/fred/0926xxx572

原文:http://www.cnblogs.com/jayruan/p/5186956.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!