My api expects the url to be like "http://server-name:port/user/id";. Removing
${headers.id} violates this. And this property changes with every request.
So, I can't remove that and I'm forced to use toD().


Zoran Regvart-2 wrote
> Hi Abhishek,
> try setting the `Exchange.HTTP_PATH` header, something like:
> 
> from("direct:a").setHeader(Exchange.HTTP_PATH,
> simple("${headers.id}").to("http4://localhost8080/user/?httpClientConfigurer=myHttpConfigClient")
> 
> zoran
> 
> On Wed, Mar 22, 2017 at 11:23 PM, Abhishek.Jha09 <

> abhij03@

> > wrote:
>> Hi all,
>>
>> Subject pretty much sums up my query. I have a route like
>>
>>    from("direct:a").routeId("myroute")
>>
>> .toD("http4://localhost:8080/user/${headers.id}?httpClientConfigurer=myHttpConfigClient")
>>
>> I have set up "myHttpConfigClient" in SimpleRegistry in camel context.
>> When
>> I change the config values of this instance and add the route again to
>> camel
>> context, the config parameters don't change. However, if I do the same in
>> a
>> route created like below, without dynamic to, it works perfectly fine.
>>
>>    from("direct:a").routeId("myroute")
>>
>> .to("http4://localhost:8080/user?httpClientConfigurer=myHttpConfigClient")
>>
>> Can anyone please help me with this?
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Unable-to-update-httpclientconfigurer-instance-on-dynamic-to-endpoint-tp5795918.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> Zoran Regvart





--
View this message in context: 
http://camel.465427.n5.nabble.com/Unable-to-update-httpclientconfigurer-instance-on-dynamic-to-endpoint-tp5795918p5796026.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to