Have you referred Routing Slip concept? http://camel.apache.org/routing-slip


On Fri, Feb 28, 2014 at 5:12 PM, Steffen Larsen <zoo...@gmail.com> wrote:

> Hi Guys,
>
> I need to call different URLs all depending on a earlier route.
> So based on a earlier header I need to update the URL that needs to be
> called.
>
> I have tried:
>
> .setHeader(Exchange.ACCEPT_CONTENT_TYPE, constant("application/json"))
> .setHeader(Exchange.HTTP_METHOD, constant("GET"))
> .setHeader(Exchange.HTTP_CHARACTER_ENCODING, constant("UTF-8"))
> .to("http://localhost:8080${header.metadataUrl}";);
>
> I have also tried:
>
> .setHeader(Exchange.ACCEPT_CONTENT_TYPE, constant("application/json"))
> .setHeader(Exchange.HTTP_METHOD, constant("GET"))
> .setHeader(Exchange.HTTP_CHARACTER_ENCODING, constant("UTF-8"))
> .toF("http://localhost:8080";, header("metadataUrl"));
>
>
> But none of those worked.. If I do a  log(${header.metadataUrl}) it prints
> out the correct url.
>
> /Steffen

Reply via email to