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.

Http POST body
#2
Have you replaced "--devices ID--" with actual device id in the request URL?
Remove log calls from inside the request table.
Your JSON is incorrect, use json.encode to have a valid output:
Code:
test = json.encode({
  commands = {
    {
      component = 'main',
      capability = 'switch',
      command = 'on',
    }
  }
})
Reply


Messages In This Thread
Http POST body - by CristianAgata - 01.02.2023, 17:11
RE: Http POST body - by admin - 02.02.2023, 08:29
RE: Http POST body - by CristianAgata - 02.02.2023, 08:38
RE: Http POST body - by CristianAgata - 02.02.2023, 12:43

Forum Jump: