From ec2f7ce4232d30156c21e68418cc57e32415a3c3 Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 7 Feb 2024 15:45:26 -0600 Subject: owo --- docs/net.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/net.md b/docs/net.md index cfc064e..6387589 100644 --- a/docs/net.md +++ b/docs/net.md @@ -35,15 +35,17 @@ server:unlock() closes server -### server:GET +### server:GET/POST/... 'takes a string (the path) and a function to be ran in the background on request the function has 2 arguments, the first (res) contains functions and info about resolving the request, the second (req) contains info on the request, the path allows for wildcards, multiple get requests per path is allowed +the actual name of the function will change based on what request method you want to accept, all requests are treated the exact same on the backend, besides HEAD requests which will also use all GET requets, and the 'all' variant will get everything + ```lua -server:GET("*", function(res, req, next) +server:all("*", function(res, req, next) if(req['Version'] ~= "HTTP/1.1") then res:close() end -- cgit v1.2.3