From 338736f6cd60bf634ef04ab246187caa78597789 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 16 Aug 2020 21:04:26 +0200 Subject: Added data to lua response --- default.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'default.lua') diff --git a/default.lua b/default.lua index d3a0c61..95ba609 100644 --- a/default.lua +++ b/default.lua @@ -1,5 +1,7 @@ --- Default client request handler. -- TODO: Add documentation once request and response API are more stable. return function (method, path, version, headers, data) - return [["Hello from plop/lua!"]] + local response_data = [["Hello from plop/lua!"]] + local headers = {Connection="close", ["Content-Length"]=#response_data, ["Content-Type"]="application/json"} + return {status=200, headers=headers, data=response_data} end -- cgit v1.1