This connector makes a HTTP request when invoked.

See the reference documentation for Custom Actions for guidance on how to use this configuration definition.

In this example we use a url from ngrok which allows us to observe the data that is produced by the HTTP connector. You should replace the url in the config with your own web service.

The transformation uses the event variable to send the entire emitted event to the external URL.

{
  "$class": "io.clause.outbound.physical.Http",
  "url": "http://<URL>.ngrok.io",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {
    "obligation": event
  }
}

Note that for debugging you can run http-echo-server locally, which will dump all output to console.