summaryrefslogtreecommitdiffhomepage
path: root/default.lua
blob: 14cdbc96b2af38204e96f65cc74bccba01fe4788 (plain)
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