Hi,
I've an url with query parameters which is dynamically generated. i don't
know how many parameters there are. i want to hit the url and get the body.
say my url looks like : http://myhost.com?name=xxx&id=yyy
it needs basic authentication.
so i request
Object object = producerTemplate.requestBody("direct:get", url);

and my route is : 
from("direct:epGet")
    .setHeader(Exchange.HTTP_METHOD, constant("GET"))
   
.recipientList(simple("${body}?authMethod=Basic&authUsername=user&authPassword=pass"));

but when i run there is an error. 
The exchange message body is set correctly
Endpoint[direct://epGet] Exchange[Message:
http://myhost.com?name=xxx&id=yyy]

but it creates the following endPoint which is not correct.
DEBUG DefaultComponent:117 - Creating endpoint
uri=[http://myhost.com?authPassword=******&authUsername=user&id=yyy&name=xxx%3FauthMethod%3DBasic],
path=[myhost.com]

to resolve this query param what should i do? any idea?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Work-with-Exchange-HTTP-QUERY-tp5735839.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to