Skip to content

Releases: Liang2580/lua-resty-cookie-parser

1.0

11 Jun 02:58
e55d693
Compare
Choose a tag to compare
local json=require "cjson"
function return_message(status,msg)
	ngx.header.content_type = "application/json;"
	ngx.status = status
	ngx.say(json.encode(msg))
    ngx.exit(status)
end

function getAllCookie()
    local parser = require "cookie"
    local cookie =parser:new()
    local cookie_list = cookie:getcookie()
    return return_message(200,cookie_list)
 end