(19.04.2021, 06:31)admin Wrote: Try this:
Code:http = require('socket.http') ltn12 = require('ltn12') body = '{"lift":50}' res, code = http.request({ url = '192.168.1.80:40850/api/8EBFA5778F/lights/2/state/', method = 'PUT', headers = { ['Content-Length'] = #body, }, source = ltn12.source.string(body) }) log(res, code)
Excellent
Thanks. I had to put in http:// in front of the url, but else it worked perfectly.
BR
Kai-Roger
Kai-Roger