Procedure
-
Double-click cHttp to open its Basic settings view in the Component tab.
-
In the URI field, enter
"http://localhost:8088/user"
where the service will be accessible for requests. - Click the Server radio button to use this cHttp component as a server. Keep the default settings of the other options.
-
Double-click cProcessor to
open its Basic settings view in the
Component tab.
-
In the Code area, enter the following
code to get the header
id
of the exchange message:System.out.println(exchange.getIn().getHeader("id"));
- Press Ctrl+S to save your Route.