增加测试例子
This commit is contained in:
parent
9b1de255d2
commit
f694593436
|
|
@ -13,16 +13,24 @@
|
||||||
|
|
||||||
--max =a and b or c--a?b:c
|
--max =a and b or c--a?b:c
|
||||||
|
|
||||||
local cjson = require("cjson")
|
local User = require("model.user")
|
||||||
local header = ngx.req.get_headers()
|
|
||||||
for k,v in pairs(header) do
|
|
||||||
ngx.say("[header] name:", k, "value:", v)
|
|
||||||
end
|
|
||||||
|
|
||||||
local payloads = ngx.req.get_uri_args()
|
local user = User.find("1")
|
||||||
for k,v in pairs(payloads) do
|
ngx.say(user)
|
||||||
ngx.say("[params] name:", k, " value:", v)
|
local userPages = User:paginate(1)
|
||||||
end
|
ngx.say(userPages)
|
||||||
|
|
||||||
|
--获取请求参数的键值和数据值
|
||||||
|
--local cjson = require("cjson")
|
||||||
|
--local header = ngx.req.get_headers()
|
||||||
|
--for k,v in pairs(header) do
|
||||||
|
-- ngx.say("[header] name:", k, "value:", v)
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
--local payloads = ngx.req.get_uri_args()
|
||||||
|
--for k,v in pairs(payloads) do
|
||||||
|
-- ngx.say("[params] name:", k, " value:", v)
|
||||||
|
--end
|
||||||
|
|
||||||
--去掉组装最后一位逗号(,)
|
--去掉组装最后一位逗号(,)
|
||||||
--local newKeys = keys:sub(1, #keys -1)
|
--local newKeys = keys:sub(1, #keys -1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user