This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

WebCGI Trigger
#2
Try the code below and see what you get in the log. That's the response from your system. Please change the url to the correct url to make it work.

local http = require "socket.http"

local data = ""

local function collect(chunk)
if chunk ~= nil then
data = data .. chunk
end
return true
end

local ok, statusCode, headers, statusText = http.request {
method = "GET",
url = "http://192.168.5.176/cgi/WebCGI?1500101=...tent=Hello",
sink = collect
}

log("ok\t", ok);
log("statusCode", statusCode)
log("statusText", statusText)
log("headers:")
for i,v in pairs(headers) do
log("\t",i, v)
end

log("data", data)
Reply


Messages In This Thread
WebCGI Trigger - by JXA - 10.01.2020, 22:21
RE: WebCGI Trigger - by Joep - 11.01.2020, 12:30
RE: WebCGI Trigger - by JXA - 12.01.2020, 20:50
RE: WebCGI Trigger - by JXA - 14.01.2020, 13:49
RE: WebCGI Trigger - by admin - 14.01.2020, 13:52
RE: WebCGI Trigger - by JXA - 14.01.2020, 20:53
RE: WebCGI Trigger - by admin - 15.01.2020, 08:40

Forum Jump: