Refactor HttpPost rules into things and channels

Hi,
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"
		when
			Item L_Room received command
		then
			var Number brightness = Math::round((L_Room.state as Number * 2.55).floatValue())
			val String URL = "http://192.168.0.110/api/dimmer/set"
			val String contenttype = "application/json"
			var String jsondata = '{"dimmer": {"desiredBrightness": ' + brightness + '}}'
			sendHttpPostRequest(URL, contenttype, jsondata)
			logInfo("lights.rules", "L_Room brightness set to " + brightness)
	end

to:

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

How to generate HttpPostRequest for that?

P.

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 https://www.openhab.org/addons/bindings/http1/ for the docs and examples.