Can someone show me a simple example? GET or POST, what is easier.
srv=net.createServer(net.TCP) srv:listen(80,function(conn)
conn:on("receive",function(conn,payload) print(payload)
conn:send("HTTP/1.1 200 OK\n\n")
conn:send('<!DOCTYPE html>')
conn:send('<html>')
conn:send('<head><meta charset="utf-8" /></head>')
conn:send('<body>')
conn:send('<form action="" method="get"><input type="submit" name="stat" value="1"></form>')
conn:send("</html></body>")
conn:on("sent",function(conn) conn:close() end)
end)
end)Thanks