Virtual Switch device sending a JSON/REST http command

Is it possible to use a virtual switch device to send a rest or json command to send a switching command to another system that supports REST?
A flip of the virtual switch should send an on or off command to the system via rest/json.
Thanks!