summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2020-08-15 22:53:36 +0200
committerAki <please@ignore.pl>2020-08-15 22:53:36 +0200
commit8796c9081555faf058bf1bf8979897b225fb21d5 (patch)
tree8c705b0f8b0ab8e5810d7d1989b9e5e9d2dbd0e9
parent55b46c8ce1806f21e6bfd469cc464b6630aaf072 (diff)
downloadplop-8796c9081555faf058bf1bf8979897b225fb21d5.zip
plop-8796c9081555faf058bf1bf8979897b225fb21d5.tar.gz
plop-8796c9081555faf058bf1bf8979897b225fb21d5.tar.bz2
Cleaned up default lua script
-rw-r--r--default.lua14
1 files 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