camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sleeper <>
Subject How could I post a Map to my restful api by camel?
Date Thu, 29 May 2014 06:13:05 GMT
I have a web app,which provides some restful api,some of them have been
marked as @POST.

In my camel router,I wanna post a Map params to the restful api,how could I
do it?

Exchange res = template.request("direct:///start", new Processor() {
	public void process(Exchange exchange) throws Exception {
		exchange.getIn().setHeader("to", targetApp);//targetApp is my restful api
		exchange.getOut().setBody(params);//params is a java.util.Map type

here is the problem
1)when I set the map type into the body,My rest can not get the request.
2)when I turn the map into a String type,My rest get the request,but where
is my params data gone??

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message