GET数据解析:
使用自带的req.query进行解析
console.log(req.query);
POST数据解析:
使用中间件(body-parser)加工一次后再使用req.body进行解析,若不进行加工,req.body解析出来的将是undifine
const bodyParser=require("body-parser");    //导入中间件
var server=express();                       //创建服务
server.use(bodyParser.urlencoded({}));      //中间件加工
                                                                          //中间件可以有两个参数:如下(可以不写)
                                                                          //server.use(bodyParser.urlencoded({
                                                                          //extended:true; //扩展模式
                                                                          //limit: 2*1024*1024 //大小限制 2MB ,默认大小:100KB
                                                                          //}));
console.log(req.body);                      //解析
原文:http://www.cnblogs.com/goodxiao/p/6828000.html