var http = require (‘http‘);
var fs = require (‘fs‘);
var qs=require(‘querystring‘);
var hostname=‘127.0.0.1‘;
var port=8080;
//创建服务
var server=http.createServer(function(req,res){
if(req.url!==‘./favicon.ico‘){
req.on(‘data‘,function(data){
console.log(‘服务器接收到的数据:‘+decodeURIComponent(data));
var param=qs.parse(decodeURIComponent(data));
console.log(param);
})
}
})
原文:http://www.cnblogs.com/webfont-yxw/p/7072047.html