Hi,
while investigating http binding, I found an issue. When defining an item like
Switch myTest1 {http=">[*:POST:http://myserverip/index.html?cmd=%2$s] " }
Switch myTest2 {http=">[*:POST:http://myserverip/index.html:default] " }
Switch myTest3 {http=">[*:POST:http://myserverip/index.html:on] " }
Switch myTest4 {http=">[*:POST:http://myserverip/index.html:MAP(test.map)] " }
I can see the following DEBUG logs when switching
00:21:54.829 [DEBUG] [ab.binding.http.internal.HttpBinding] - Executing url 'http://myserverip/index.html?cmd=ON' via method POST
00:21:55.527 [DEBUG] [ab.binding.http.internal.HttpBinding] - Executing url 'http://myserverip/index.html?cmd=OFF' via method POST
00:23:59.783 [DEBUG] [ab.binding.http.internal.HttpBinding] - Executing url 'http://myserverip/index.html' via method POST, with body content 'default'
00:24:09.821 [DEBUG] [ab.binding.http.internal.HttpBinding] - Executing url 'http://myserverip/index.html' via method POST, with body content 'on'
00:24:12.542 [DEBUG] [ab.binding.http.internal.HttpBinding] - Executing url 'http://myserverip/index.html' via method POST, with body content 'MAP(test.map)'
Instead of body content ‘default’ I would expect ON or OFF, and certainly there is a test.map, and I did install Map service, it works as expected when using it in an item label, so I would expect the transformation string.
EDIT: forgot to mention (sorry):
I’m running openHAB2 from debian repository,
debian is: stretch (64bit)
java version is: Java™ SE Runtime Environment (build 1.8.0_131-b11)
OH2 version is: 2.2.0-SNAPSHOT Build #986
As this is the nightly version from today, I verified the behavior once more.