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
uri
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:
http://camel.465427.n5.nabble.com/How-could-I-post-a-Map-to-my-restful-api-by-camel-tp5751684.html
Sent from the Camel - Users mailing list archive at Nabble.com.