mirror of
https://github.com/civetweb/civetweb
synced 2025-03-28 21:13:27 +00:00
Add test with new Lua syntax
This commit is contained in:
parent
98abdf96a3
commit
08520c1bc7
10
test/page7.lua
Normal file
10
test/page7.lua
Normal file
@ -0,0 +1,10 @@
|
||||
-- reflect the request information as JSON
|
||||
json = require "json"
|
||||
|
||||
response = json.encode(mg.request_info)
|
||||
|
||||
mg.response.status = 200
|
||||
mg.response.http_headers["Content-Type"] = "application/json; charset=utf-8";
|
||||
mg.response.http_headers["Content-Length"] = #response;
|
||||
mg.response.send()
|
||||
mg.write(response)
|
Loading…
x
Reference in New Issue
Block a user