camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Karlsen <davidkarl...@gmail.com>
Subject Re: HTTP Post component - parameters
Date Tue, 25 Oct 2011 21:00:07 GMT
2011/10/25 esprit <tomas.adamek@espr.it>:
> Thanks for quick reply!
>
> Does it mean that you basically converts the GET query data from header to
> POST body in xml?
Yes - it's the param1= stuff.


> There is no other way how to directly set the parameters into body within my
> Bean (in java code)? Is there any documentation regarding the message body
> content? I can see a lot of documents about integration (basically taking
> out body from previous route element and converting to next in the route but
> I really miss the info how to actually produce the message body by myself
> and what structure it should be).
Try setting the data as a map of parameternames and values in the body
- or encode it as a complete string.

> I've tried to make a map of parameters and set to body message with
> converting to string (and from log I can see the camel converted the map to
> query string) but I can't see any parameters coming in in my HTTP server I
> am calling (Tomcat).
>
> I actually didn't put there :
>
> <camel:setHeader headerName="Content-Type">
> <camel:constant>application/x-www-form-urlencoded</camel:constant>
> </camel:setHeader>
>
> As I assumed the camel will do this automatically when sending POST request.
I had to explicitly put it in.


--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Mime
View raw message