Have a look at the org.apache.camel.component.restlet.DefaultRestletBinding
class. By default form data is only bound when content type is "application/x-www-form-urlencoded". Also, only URI template values will be bound to headers.
To get at arbitrary query parameters you can do something like:
Request request = exchange.getIn().getHeader(RestletConstants.RESTLET_REQUEST, Request.class);
String value = request.getResourceRef().getQueryAsForm().getFirstValue("foo");
Also, the raw query string will be available in the CamelHttpQuery
header.
You can supply your own class which implements RestletBinding
(or extend DefaultRestletBinding
) by specifying the bean ID of a RestletBinding object in the Camel Registry using the 'restletBinding' endpoint query option. If you are using Spring register a bean like this:
<bean id="myRestletBinding" class="com.example.MyRestletBinding"/>