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.

HifiBerry REST API
#5
(09.05.2021, 21:01)Erwin van der Zwart Wrote: headers = {
    ['Content-Length'] = #body,
    ['Content-Type'] = 'application/json',
  },

Thanks. I was sure that i tried that, but apparently not :)


Now i found a new problem. This part of the code did not work:
Code:
body = require('json').encode({
    percent = event.getvalue()
})

But this this works:
Code:
body = '{"percent":"30"}'

It would have been nice if i could use the event.getvalue.
BR
Kai-Roger
Reply


Messages In This Thread
HifiBerry REST API - by Kai-Roger - 09.05.2021, 14:28
RE: HifiBerry REST API - by admin - 09.05.2021, 15:57
RE: HifiBerry REST API - by Kai-Roger - 09.05.2021, 16:15
RE: HifiBerry REST API - by Kai-Roger - 09.05.2021, 21:18
RE: HifiBerry REST API - by admin - 10.05.2021, 06:30
RE: HifiBerry REST API - by Kai-Roger - 10.05.2021, 07:21

Forum Jump: