On Wed, Jul 18, 2012 at 10:32 PM, khuss
<kamal.huss...@alcatel-lucent.com> wrote:
> Hi All,
> I am trying to set a timeout for an HTTP connection. Based on the
> documentation, we need to pass a query parameter "soTimeout=<timeout value>"
> to activate the timeout.
>
> I am able to get this working with the following route definition
>
> from("direct:start")
>   .to("http://test-timeout-url?httpClient.soTimeout=5000";)
>
> However, I need to dynamically create the URL so I am trying the following:
>
> from("direct:start")
>   .setHeader(Exchange.HTTP_URI,
> simple("http://test-timeout-url?httpClient.soTimeout=5000";))
>
>
> The above code doesn't enforce the timeout for some reason. Is there any
> other way to implement the timeout when we need to dynamically build a URL?
>

See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html


> Thanks for your help.
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/setting-http-soTimeout-via-setHeader-is-not-working-tp5716218.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to