You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by anand_tech <an...@gmail.com> on 2012/07/17 11:44:59 UTC

Apache Camel : HTTP POST : & character

I am trying to make a POST request to a restful Webservice via apache camel
http component. the url is something like this :
http://customdomain.name/service?apikey=somethingalphanumeric&consumerkey=somealphanumeric

The problem is that the & present in url is converted to &amp; and this is
passed as it is to the webservice, which then regards &"amp;" as some input,
gives me bad request error.

now how do i avoid this conversion of & to &amp;. Please note its a Post
Request. 
Also i need to POST a JSON to this webservice. This i am doing by using a
Processor and then setting the body with the JSON string like  : 
exchange.getIn().setBody("My json string");
I think the above is wrong because i have tested it couple of times and at
server end i dont get any body in request. Please tell me whats the
appropriate way.

--
View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-HTTP-POST-character-tp5716155.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Apache Camel : HTTP POST : & character

Posted by anand_tech <an...@gmail.com>.
i dont know what was the problem. I made a fresh route and used ProxyHelper
and Interface basically HidingMiddleware API thing and it started working.
:) 



--
View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-HTTP-POST-character-tp5716155p5716156.html
Sent from the Camel - Users mailing list archive at Nabble.com.