http://bbs.chinaunix.net/thread-4095178-1-1.html
- local request_method = ngx.var.request_method
- local args = nil
- local param = nil
- local param2 = nil
- --获取参数的值
- if "GET" == request_method then
- nginx.say("get")
- args = ngx.req.get_uri_args()
- elseif "POST" == request_method then
- ngx.req.read_body()
- args = ngx.req.get_post_args()
- end
- param = args["param"]
- param2 = args["param2"]
- ngx.say(param)