This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

curl to LUA
#18
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)
Reply


Messages In This Thread
curl to LUA - by KoBra - 29.12.2021, 10:41
RE: curl to LUA - by admin - 29.12.2021, 11:05
RE: curl to LUA - by KoBra - 29.12.2021, 15:18
RE: curl to LUA - by admin - 29.12.2021, 16:04
RE: curl to LUA - by KoBra - 01.01.2022, 20:30
RE: curl to LUA - by admin - 02.01.2022, 13:01
RE: curl to LUA - by KoBra - 02.01.2022, 14:05
RE: curl to LUA - by admin - 03.01.2022, 06:27
RE: curl to LUA - by KoBra - 03.01.2022, 14:26
RE: curl to LUA - by admin - 03.01.2022, 14:52
RE: curl to LUA - by KoBra - 03.01.2022, 20:43
RE: curl to LUA - by Krstfr2k - 03.03.2022, 07:08
RE: curl to LUA - by admin - 03.03.2022, 08:33
RE: curl to LUA - by Krstfr2k - 03.03.2022, 08:41
RE: curl to LUA - by admin - 03.03.2022, 09:04
RE: curl to LUA - by Krstfr2k - 04.03.2022, 12:26
RE: curl to LUA - by cekca - 27.01.2023, 13:45
RE: curl to LUA - by admin - 27.01.2023, 13:56

Forum Jump: