On Mon, Mar 11, 2019 at 2:06 AM Diptendu Dutta <[hidden email]> wrote:
> Is it possible to use the <send> tag to call a REST API?
> How would one specify the various attributes such as method (GET/POST),
> headers, body, etc.?
You can pass any data in <send> to the target, and your
EventDispatcher may interpret the data to invoke an external service.
> Is there any example code that I can consult?
WizardsTest.java , to handle a custom type of send event used in
wizard-02.xml , registers a custom EventDispatcher which can read
type, target and data, and possibly invoke an external service.
FWIW, this is beyond the question, but it might be interesting to
implement a generic EventDispatcher to integrate with Apache Camel,
simply dispatching to a specific route based on <send> attributes.
e.g, type="camel" data="...", where data is passed to a Camel route as