camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Karlsen <>
Subject Re: HTTP Post component - parameters
Date Tue, 25 Oct 2011 19:17:40 GMT
I have it working with http (but could not get it working with ahc):

			<camel:setHeader headerName="CamelHttpMethod">
			<camel:setHeader headerName="Content-Type">
<camel:to uri="http://......" />

2011/10/25 esprit <>:
> Hi,
> I am really struggling to get camel send HTTP request with post data in my
> Bean.
> I have simple route jetty listener -> bean -> http call to url.
> At first I implemented the http as a GET (so I basically create the HTTP
> query by myself and then set it to exchange header - but now I would like to
> change the type of this request to post and I can't make it working.
> I've added the post header to my spring route definition and I can see that
> camel now sends to POST request (which is fine). But I don't know how can I
> set my parameters into message body.
> My problems are:
> 1) I assume I should use the getOut() message body for setting parameter ?
> 2) should I create a map of parameters and then somehow convert it to body
> message? Or can I keep it as a query string and camel magically coverts this
> string to parameter map?
> Thanks you very much!
> BTW I'm sorry for asking maybe stupid question but I wasn't able to find
> anything related to actual form of body message on the site pages (and
> honestly I find it very difficult to use as anytime I am trying to do some
> thing with camel I actually need to try and test as I miss some really
> simple examples how to do some basic stuff. Maybe its just my fault and I'm
> not looking on right places?)
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

David J. M. Karlsen -

View raw message