14.07.2021, 04:03
I have the code below to receive an http post from external server via port 8083. After that, how can I response so the server would get the http status code 200?
Code:
local socket = require("socket")
local server = assert(socket.bind("*", 8083))
local tcp = assert(socket.tcp())
while 1 do
local client = server:accept()
line = client:receive()
client:send('HTTP/1.1 200 OK \n')
end