1 function handle_request(env)
2 uhttpd.send("Status: 200 OK\r\n")
3 uhttpd.send("Content-Type: text/html\r\n\r\n")
5 uhttpd.send("<h1>Headers</h1>\n")
6 for k, v in pairs(env.headers) do
7 uhttpd.send(string.format("<strong>%s</strong>: %s<br>\n", k, v))
10 uhttpd.send("<h1>Environment</h1>\n")
11 for k, v in pairs(env) do
12 if type(v) == "string" then
13 uhttpd.send(string.format("<code>%s=%s</code><br>\n", k, v))