5 hours ago
(9 hours ago)admin Wrote: Method should be set to GET. What do you get in Logs after sending the request?
With the method set to GET it would log:
Code:
* arg: 1
* string: Error
Bad Request!
* arg: 2
* number: 400
* arg: 3
* table:
["content-length"]
* string: 21
["content-type"]
* string: text/plain;charset=utf-8
["connection"]
* string: closeUPDATED while testing GET:
- by specifying the full size url_on and url_off it seems to be working with an else-if statement.
Code:
url_on = 'http://admin:xxxxxx@10.0.100.10/cgi-bin/configManager.cgi?action=setConfig&Encode%5b0%5d.MainFormat%5b0%5d.VideoEnable=true&Encode%5b0%5d.ExtraFormat%5b0%5d.VideoEnable=true'
--skipped the middle part
if (value == true) then
res, err, hdrs = request({
url = url_on,
})
else
res, err, hdrs = request({
url = url_off,
})
end