Jundl Jundl - 29 days ago 15
HTTP Question

Camel: dynamic rest uri path with EL in DSL not possible?

I'm new to camel and use it for http routing configured by Spring DSL with the camel servlet. Unfortunately a routing to "to" like this not works:

<to uri="https://host/path/${headers.pname1}/2016/11?bridgeEndpoint=true"/>


where ${headers.pname1} is a http query string parameter from the http input on servlet.

How to use expression language in the uri path?

Answer

According to the comment by Claus Ibsen,

use the extra tag "toD" instead of "to":

<toD uri="https://host/path/${headers.pname1}/2016/11?bridgeEndpoint=true"/>

Probably they made a second tag for performance reasons.

Comments