- POST参数获取
ngx.req.read_body()
local args = ngx.req.get_post_args()
ngx.say(args["name"])
- JSON参数获取
local cjson = require('cjson')
ngx.req.read_body()
local args = cjson.decode(ngx.req.get_body_data())
local mdn = args["name"]
- GET参数获取
local mdn=ngx.var.arg_name
网友评论