From 8796c9081555faf058bf1bf8979897b225fb21d5 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 15 Aug 2020 22:53:36 +0200 Subject: Cleaned up default lua script --- default.lua | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/default.lua b/default.lua index 14cdbc9..d3a0c61 100644 --- a/default.lua +++ b/default.lua @@ -1,13 +1,5 @@ --- 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"]] +-- TODO: Add documentation once request and response API are more stable. +return function (method, path, version, headers, data) + return [["Hello from plop/lua!"]] end - -return handler -- cgit v1.1