1
2
3
4
5
6
7
8
9
10
11
12
13
|
--- Default client request handler.
--- @return string Body of the response
local
function handler (method, path, version, headers, data)
io.write("(", version, ") [", method, "] ", path, "\n")
for header, value in pairs(headers) do
io.write(" - ", header, " = '", value, "'\n")
end
print(data)
return [["Hello, from plop/Lua"]]
end
return handler
|