aliez-query
v1.0.3
Published
parse aliez query details
Downloads
25
Maintainers
Readme
aliez-query
解析请求数据
安装
npm instal aliez-query
用法
var aliez = require('aliez');
var aliez_queryt = require('aliez-query');
aliez.createServer()
.use(aliez_query)
.post('/', function(req, res){
// 假设get请求数据为id=1&name=666#aaa
// 请求对象
console.log(req.query); // {id: 1, name: 666}
// 未处理的字符串
console.log(req.RAW_QUERY); // id=1&name=666
// 锚点
console.log(req.anchor); // aaa
}).listen(8080);