I'm learning Camel and created a route as follows:
from("timer:stream?period={{inbound.timer.period}}")
...
.setHeader(Exchange.HTTP_URI, simple(outboundUri()))
...
.multicast()
.to(
"stream:header",
"file://build?autoCreate=false",
outboundHttp
);
The outboundUri()
method returns a URI with a placeholder in the path, ${header.CamelFileName}
. What I'd like to do is resolve this using a header mapper of some sort, where I can look at some headers in order of priority, and if none present, set a default value for CamelFileName
.
How can I achieve this using the HTTP4
component?