实例代码test.js var http=require('http'); var url=require('url'); var querystring=require('querystring'); http.createServer(function(request, response) { var urlStr = request.url; var methodName = urlStr.substring(1, urlStr.indexOf('?')); console.log('me…