camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception
Date Thu, 26 Mar 2015 14:01:06 GMT
Hi,

Did you try to setup the query parameter with the header name of Exchange.HTTP_QUERY?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 26, 2015 at 2:28:41 PM, Liliana.Neagul (liliana.iovanovici@gmail.com) wrote:
> Hi,
>  
> I'm trying to send from a camel route an HTTP request using an encoded query
> parameter (for symbol euro
> €), and it seems that camel decode the parameter and sent it to httpclient
> decoded. Httpclient fails then with 'Invalid query' exception.
>  
> My route is:
> from("jetty:http://localhost:5443/getCurrency")
> .setHeader(Exchange.HTTP_METHOD, constant("GET"))
> .setHeader(Exchange.HTTP_URI, simple(Constants.PATH+
> "/code=EUR&symbol=%E2%82%AC&places=2"))
> .to("http://host");
>  
> When Camel constructs the URI object, from Exchange, the query parameter
> 'symbol' is decoded in '€'.
>  
> Did someone succeed to pass encoded params? should I set some new headers to
> camel route?
>  
> Thanks for your help,
> Liliana
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794.html
 
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Mime
View raw message