Device handler with HTTP POST request?

I want to make a virtual toggle that can send a HTTP POST request to a web endpoint on my home server (I have both internal and external endpoints).

I have an esp8266 using Arduino IDE to create an IR remote from a local webserver and it works great. I also have an external webserver running on an RPi (with SSL) to use with Amazon Echo and IFTTT Maker channel. However I have a ST hub and want to create a switch/toggle that can trigger that web endpoint.

I guess it has something to do with Device handler and http post but I don’t have any experience with ST Groovy, if there’s any example or existing codes around, it would be great :smiley:

Any input much appreciated!