local args = {}
args["name"] = "張三"
args["sex"] = "男"
local captureRes;
if ngx.var.request_method == "POST" then
captureRes = ngx.location.capture('/dsideal_yy/test', {method = ngx.HTTP_POST, headers = { ["Content-Type"] = "application/x-www-form-urlencoded" }, body = ngx.encode_args(args)})
else
captureRes = ngx.location.capture('/dsideal_yy/test', {method = ngx.HTTP_GET, args = args})
end
if captureRes.status == 200 then
local ret = cjson.decode(captureRes.body)
end