You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
local router = require 'router'
local r = router.new()
r:match(route)
local method = ngx.var.request_method;
local post_data = "";
if(method == "POST") then
ngx.req.read_body();
local post_data = ngx.req.get_post_args();
end
local ok, errmsg = r:execute(
method,
ngx.var.request_uri,
ngx.req.get_uri_args(), -- all these parameters
post_data, -- will be merged in order
{other_arg = 1}
) -- into a single "params" table
if ok then
ngx.status = 200
else
ngx.exec("@client")
-- ngx.status = 404
-- ngx.print("Not found!")
-- ngx.log(ngx.ERROR, errmsg)
end
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
require("route");
local router = require 'router'
local r = router.new()
r:match(route)
local method = ngx.var.request_method;
local post_data = "";
if(method == "POST") then
ngx.req.read_body();
local post_data = ngx.req.get_post_args();
end
local ok, errmsg = r:execute(
method,
ngx.var.request_uri,
ngx.req.get_uri_args(), -- all these parameters
post_data, -- will be merged in order
{other_arg = 1}
) -- into a single "params" table
if ok then
ngx.status = 200
else
ngx.exec("@client")
-- ngx.status = 404
-- ngx.print("Not found!")
-- ngx.log(ngx.ERROR, errmsg)
end
The text was updated successfully, but these errors were encountered: