Am 06.11.11 21:07, schrieb lukas.kostial:
> Hi All,
>
> Could you please tell me how to send either GET or POST parameters
> with HTTP request produced by Jetty Producer?
> It seems that:
>
> protected override def receiveBeforeProduce = {
> case whatever => Message("",Map(ParamName->ParamValue))
> }
>
> is not enough.
It should work. That's the right way to do it. See also this example:
https://github.com/jboner/akka-modules/blob/v1.2/akka-modules-samples/akka-sample-camel/src/main/scala/sample/camel/Actors.scala#L128
It could be that the camel-http or camel-jetty filters out some headers
before sending the HTTP message (see Camel docs or book for details). A
list of supported headers (that are are used by Camel internally) can be
found at
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java.
Other (i.e. application-specific) headers should work as well.
If you continue to see problems setting HTTP headers this way, please
post an example.
Cheers,
Martin
> I've managed to send GET params by modifying
> CamelHttpQuery header but I'm not really sure if this is the best
> (nicest) way. Is there any easier/more straightforward way how to do
> that?
>
> Thanks,
> Lukas
>
--
Martin Krasser
blog: http://krasserm.blogspot.com
code: http://github.com/krasserm
twitter: http://twitter.com/mrt1nz