NEWS
Simple API Use SOLVED
-
@tehmilcho sagte in Simple API Use SOLVED:
:23: attempt to call a nil value (field 'escape')
Try this
url = url:gsub("([^A-Za-z0-9_])", function(c) return string.format("%%%02X", string.byte(c)) end)@mcu said in Simple API Use SOLVED:
url = url:gsub("([^A-Za-z0-9_])", function(c) return string.format("%%%02X", string.byte(c)) end)
then it seems to get stuck, no error but will not finsh and also the state in iobroker is not changed, when you Output the new string you will get:
http%3A%2F%2F192%2E168%2E178%2E37%3A8087%2Fset%2F0_userdata%2E0%2EVirtualDevices%2Ehc3lite%2EFlurPIR%2D1%3Fvalue%3Dtrue%26prettyPrint
-
@mcu said in Simple API Use SOLVED:
url = url:gsub("([^A-Za-z0-9_])", function(c) return string.format("%%%02X", string.byte(c)) end)
then it seems to get stuck, no error but will not finsh and also the state in iobroker is not changed, when you Output the new string you will get:
http%3A%2F%2F192%2E168%2E178%2E37%3A8087%2Fset%2F0_userdata%2E0%2EVirtualDevices%2Ehc3lite%2EFlurPIR%2D1%3Fvalue%3Dtrue%26prettyPrint