The query parameters are put into message header, you can get username and 
password just like this
rest("/user").description("User services") 
.get("/login”).process(new Processor() {
                            public void process(Exchange exchange) throws 
Exception {
                                String username = 
exchange.getIn().getHeader("username", String.class);
                                String password = 
exchange.getIn().getHeader("password", String.class);
                                ...
                            }
                        });

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On October 17, 2014 at 4:23:09 PM, panzerhans ([email protected]) wrote:
> I am unable to figure out how to expose Query params to a Rest resource
> exposed with the new Rest DSL in Camel 2.14
>  
> How would I go about to enable something like 'username' and 'password' via
> query params?
>  
> rest("/user").description("User services")
> .get("/login").description("Login user. NB, user parameters
> 'username' and 'password'")
> .outType(UserDTO.class) *-- missing setting of query params*
>  
> Call: http://localhost:8080/user/get?username=blahblah&password=secretstuff  
>  
> *NB! * The example above is constructed, What I am trying to convey is I am
> unable to find any way with the REST DSL to append a Query param.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp5757650.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  

Reply via email to