Answer the question
In order to leave comments, you need to log in
LuaSocket: how to make a non-blocking http request?
There is a script that performs some actions and, if successful, sends it to several http post-request servers:
urls = {'http://test1.dev', 'http://test2.dev'}
http = require('socket.http')
while true do
result = do_something()
if result then
for _, url in ipairs(urls) do
http.request(url, 'data=' .. result)
end
end
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question