This is a commonly asked question if you have IoT devices which only support http
GET requests (like my Mobotix cameras) but OH3 requires http
POST method to trigger items from external.
There is an easy workaround to use the CMD servlet
but that is not an official feature and subject to be dropped at any time.
There are also quite a few solutions for a get to post converter out there but to me they seem to be complicated (like installing a couple of packages and scripts, make changes to config files etc…).
That’s why I tried to find a replacement which is as easy as possible to implement, ideally without any additional apps.
Below is an html code which you have to copy-paste into an
.html file and enter an API Token. Copy the file (any file name will do) to a directory of your choice in
the syntax is almost the same like the CMD servlet:
I know, I could have done the code below even better, like making use of the constructor
URLSearchParams() but I wanted to have it as compatible as possible with older web clients like IE.