02.11.2017, 07:48
Can you also try running request like this?
Code:
sock = require('socket').tcp()
sock:settimeout(5)
res, err = sock:connect('192.168.1.xx', 80)
if res then
sock:send('GET /inst.json HTTP/1.1\r\n\r\n')
res = sock:receive('*a')
log(res)
if res then
p, e = res:find('\r\n\r\n', 1, true)
if e then
data = res:sub(e + 1)
data = require('json').pdecode(data)
log(data)
end
end
end