Refactor HttpPost rules into things and channels

I made a simple integration via rules with BleBox modules, you can find example below. I was thinking about configuring things and dedicated channels (status, on/off, brightness) but I can’t find information on how to define a channel for calling rest api.

rule "Room light"
			Item L_Room received command
			var Number brightness = Math::round((L_Room.state as Number * 2.55).floatValue())
			val String URL = ""
			val String contenttype = "application/json"
			var String jsondata = '{"dimmer": {"desiredBrightness": ' + brightness + '}}'
			sendHttpPostRequest(URL, contenttype, jsondata)
			logInfo("lights.rules", "L_Room brightness set to " + brightness)


Thing network:device:dimm1 "Dimmer". [ hostname="", refresh=3 ] {
			Type switch : PowerSwitch [ state="api/device/state ???". command="api/dimmer/set ???", on="ON", off="OFF" ].

How to generate HttpPostRequest for that?


There is no HTTP 2 binding, yet, so there is no way to do this with Things. You can do it with the HTTP 1 binding and use cfg files and .items files, but you cannot do it in Things because there is no binding that supports Things.

See for the docs and examples.