Currently Being Moderated

QueryParam

VERSION 2

Created on: Feb 18, 2008 1:51 PM by Bill Burke - Last Modified:  Feb 18, 2008 1:51 PM by Bill Burke

@QueryParam

 

The @QueryParam annotation allows you to map a URI query string parameter or url form encoded parameter to your method invocation.

 

GET /books?num=5

 


   


   @GET
   public String getBooks(@QueryParam("num") int num) {
   ...
   }

 

Currently since Resteasy is built on top of a Servlet, it does not distinguish between URI query strings or url form encoded paramters.  Like PathParam, your parameter type can be an String, primitive, or class that has a String constructor or static valueOf() method.

 

 

Average User Rating
(0 ratings)




There are no comments on this article

More Like This

  • Retrieving data ...