Can I use HTTP Get to pass data

Raspberry Pi 4 Model B Rev 1.1 / 4GB
openHAB 3.1.0.M4

I currently use SmartThings with Webcore … and in the process of moving things over to OpenHab … current problem is passing data between SmartThings (and other Raspberry Pis) to/from OpenHab.

Is it possible to use a simple HTTP Get to pass key:value pairs to OpenHab? My hope is that I could pass a string of key:value pairs to my script where they would be parsed and acted on.

I can do this with an HTTP Post - the following curl works fine:

curl -X POST "" -H "accept: */*" -H "Content-Type: text/plain" -u oh.smartthings.rPYLEXSp0wWkPpwTJJtl8mph8hNI8hEkWvlBpQ2opV5vlGqVyM5uw21lzdP8fEzgGlQgWzDiqC6EePuu49A: -d "?key1=value1&key2=value2"

Problem now is that there is an issue getting WebCore to pass the Authentication correctly, I was hoping to avoid it for now using a simple HTTP Get.

Can this be done?


1 Like

Definitely see the link rossko57 posted, but authentication applies to GETS as wells as POST so switching to a GET isn’t necessarily going to fix your authentication woes.

1 Like

Thanks Rich … Although I’m not sure about that … I tried the method and it worked right away without any authentication (It may have been cached) … but I also tried it from another machine that wasn’t logged in and it didn’t blink an eye… probably another reason it will get removed :slight_smile: