Posts: 111
Threads: 14
Joined: Nov 2019
Reputation:
6
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)
Posts: 7
Threads: 2
Joined: Dec 2019
Reputation:
0
Many Thanks for your message.
I will test it.
Thanks!
Posts: 7
Threads: 2
Joined: Dec 2019
Reputation:
0
Hello,
yes the code is working fine without any changes.
But i still have 2 questions:
About the SMS Message "...... content=Hello this is a test SMS"
-> if you have Space character in your Message it will not be send. (sending via Browser works fine)
Any Placeholder required in Lua?
How can i send the Input Status (0/1) as "var" in the SMS Content?
--> '...... content=Hello the Input status is "var" ' (var means 0 or 1)
Many Thanks for your support!