14.01.2020, 13:52
Your end device might expect some headers or some headers are not handled properly by it. You can try sending raw request without any headers like this:
Open dev tools in browser (F12), go to Network tab, right click the request and select "Copy headers". This data can be used to send exactly the same request from LM.
Code:
ip = '192.168.5.176'
qs = '/cgi/WebCGI?1500101=account=apiuser&password=password&port=1&destination=15880270900&content=Hello'
sock = require('socket').tcp()
sock:settimeout(5)
res, err = sock:connect(ip, 80)
if res then
sock:send('GET ' .. qs .. ' HTTP/1.1\r\n\r\n')
res = sock:receive('*a')
log(res, err)
end
Open dev tools in browser (F12), go to Network tab, right click the request and select "Copy headers". This data can be used to send exactly the same request from LM.