users@jersey.java.net

Re: [Jersey] Lists as QueryParams

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 28 Jan 2010 10:13:15 +0100

On Jan 28, 2010, at 9:06 AM, Felipe Gaścho wrote:

>> IIRC, the way you have it now matches what a HTML form would
>> produce. One thing to
>
> +1
>
> Form is the way to go ...
>

Clarification: HTML forms != HTTP POST

HTML forms can describe how clients make GET requests using query
parameters or POST requests using form parameters encoded in the
request entity.

Paul.

> an example:
>
> @POST
> @Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
> public Response insert(@Context UriInfo info, @Context HttpHeaders
> headers,
> @FormParam("login") String login,
> @FormParam("password") String password,
> @FormParam("email") String email, @FormParam("name") String name,
> @FormParam("confirmationUrl") String url,
> @FormParam("key") String key, @FormParam("locale") String locale)
> { ... }
>
> http://kenai.com/projects/puj/sources/arena/content/arena-http/src/main/java/com/kenai/puj/arena/http/PujUserResource.java
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>