The issue with setting queries in the request URI has been resolved.
Please see https://issues.apache.org/jira/browse/CAMEL-3808
Regards.
On 03/18/2011 10:18 AM, mat127 wrote:
Hello,
I am using the camel-restlet component to build a REST client calling some
3rd party application RESTful API that is not built upon Camel.
In some cases I need to provide parameters to GET requests like e.g. item id
etc. According to the documentation and the source code I understood that
the restlet component pushes all header fields into the restlet.org request
(using the DefaultRestletBinding class). But I am unable to produce the
desired request this way at all.
Let me explain on following example:
<camel:route>
<camel:from uri="direct:test"/>
<camel:setHeader headerName="locale">
<camel:constant>cs_CZ</camel:constant>
</camel:setHeader>
<camel:to uri="restlet:http://localhost:8089/"/>
...
</camel:route>
Calling this route using following Scala code:
producer.requestBodyAndHeader(
"direct:test", "",
"itemId", id.id,
classOf[java.util.Map[String,Object]]
)
will produce following HTTP request on the localhost:
[pema@dev ~]$ nc -l 8089
GET http://dev:8089/ HTTP/1.1
Host: dev:8089
User-Agent: Noelios-Restlet-Engine/1.1.10
Referer: camel-restlet
Accept: */*
Connection: close
The problem is that the 'locale' and the 'id' parameters are missing there.
How can I get them into the GET request query string? Any hints are welcome!
Regards, Petr
--
View this message in context:
http://camel.465427.n5.nabble.com/restlet-component-GET-request-and-query-string-parameters-tp3964973p3964973.html
Sent from the Camel - Users mailing list archive at Nabble.com.