08.02.2023, 00:25
(07.02.2023, 08:02)admin Wrote: Try this:
Code:http = require('socket.http')
ltn12 = require('ltn12')
body = '{"iZoneV2Request": {"Type": 1,"No": 0,"No1": 0}}'
resp = {}
url = 'http://...'
res, code = http.request({
url = url,
method = 'POST',
headers = {
['Content-Type'] = 'application/json',
['Content-Length'] = #body,
},
source = ltn12.source.string(body),
sink = ltn12.sink.table(resp),
})
log(res, code, resp)
Sadly, same error
Code:
Event for 0/56/180 08.02.2023 11:24:21
* table:
[1]
* string: {ERROR}