camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: camel-http instructions wrong
Date Sun, 19 Oct 2008 09:44:26 GMT

Yeah the sample is wrong. It doesn't use GET but POST as you write. I will look into it, so
Camel will be smarter and use GET if the URI has parameters.

Otherwise you can provide method to use by adding a header, see wiki.

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: HockeyDave [] 
Sent: 18. oktober 2008 19:08
Subject: camel-http instructions wrong

Camel-http documents a way to send query parameters, but it doesn't work.

Specifically this section:
URI Parameters from the Message
Map headers = new HashMap();
headers.put(HttpProducer.QUERY, "q=Camel&lr=lang_en");
// we query for Camel and english language at Google
template.sendBody("", "", headers);
However the signature of this call doesn't even exist.  Attempting to use a
different signature 
template.sendBody(", headers);

also won't work because the parameters just gets jammed into a post-body. 
You can't leave the query actually on the URI either because you'll get a
can't find endpoint failure.  This is kind of a rock and a hard place issue
as there doesn't seem to be any way to get there from here.  :)

The issue seems to be covered in this forum entry, but I don't see any kind
of a workaround for this.  Does anyone have a workaround?

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

View raw message