27.01.2023, 13:56
You need to use digest auth request function from this example: https://forum.logicmachine.net/showthrea...64#pid9364
Code:
body = '<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>'
res, code = request({
url = 'http://admin:123@IP/...',
method = 'PUT',
headers = {
['Content-Length'] = #body,
},
source = ltn12.source.string(body),
})
log(res, code)