dev@jsr311.java.net

Re: JSR311: POSTed form data

From: Stefan Tilkov <stefan.tilkov_at_innoq.com>
Date: Fri, 15 Feb 2008 13:00:13 +0100

I'm not sure this merits being supported by an annotation - why do
this for HTML form data and not for other formats?
If it's added, I'd like a new annotation because calling something
sent via POST "_query_ param" just feels wrong.

Stefan
--
Stefan Tilkov, http://www.innoq.com/blog/st/
On Feb 14, 2008, at 10:26 PM, Marc Hadley wrote:
> Issue 30[1] requests that we improve support for POSTed form data,  
> either by supporting it with the existing @QueryParam annotation or  
> by adding a new annotation, e.g. @PostParam or @FormParam.
>
> Note that we already require support for
>
> @POST @ConsumeMime("application/x-www-form-urlencoded")
> public Foo update(MultivaluedMap<String,String> formData) {
>  String name = formData.get("name");
>  ...
> }
>
> where formData can be used to get at the individial form fields.
>
> The suggested addition would add support for doing something like:
>
> @POST @ConsumeMime("application/x-www-form-urlencoded")
> public Foo update(@QueryParam("name") String name) {...}
>
> Opinions ?
>
> If you are in favor, do you think this warrants a new annotations or  
> a change to the existing @QueryParam.
>
> If you favor a change to @QueryParam then which should take  
> precedence if the same name is used for a field in the request  
> entity and a URI query param ?
>
> Thanks,
> Marc.
>
> [1] https://jsr311.dev.java.net/issues/show_bug.cgi?id=30
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>
>