Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1746

Provide support for multi valued resource method array type arguments

XMLWordPrintable

      It would have been great to provide support for custom conversion between multi valued param (queryParam, MatrixPartam, headerParam...) and array type arguments.

      For example it will allow to deals with URL like http://localhost:8085?dates= 20161214,20161215 define by following resource:

      @Path("/")
      
      public class ParamConverterResource {
      
       
      
      	// This method can only handle one 'dates' query parameter
      
      	@GET
      
      	public Response multiValuedQueryParam(@QueryParam("dates") Date[] dates) {
      
      		return Response.ok(format(dates)).build();
      
      	}
      
       
      
      }
      
      

      The same feature has already been developped for custom conversion between multi valued param and Collection type arguments into https://issues.jboss.org/browse/RESTEASY-1566

            rsigal@redhat.com Ronald Sigal
            nicones Nicolas NESMON
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: