users@jsr311.java.net

Re: [Resteasy-developers] _at_QueryParam and POST

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Tue, 03 Jun 2008 15:55:13 +0200

Hi,

IMO JAX-RS should support @FormParam.

best regards
   Stephan

Bill Burke schrieb:
> Yeah, we had a significant discussion about this on the JSR mail list.
> The servlet specification makes no distinction between
> www-form-urlencoded parameters and URI parameters. This is not the
> case in JAX-RS. @QueryParam only works with URI parameters
> (/foo?param=value).
>
> The only way to get at form params is to use a MultivaluedMap as your
> request representation.
>
> @POST
> public void post(MultivaluedMap<String, String> form) {...}
>
> We had discussed introducing a @FormParam annotation, but I don't
> think an agreement had been reached. If you think things need to be
> changed, place voice your opinion on users_at_jsr311.dev.java.net (in copy).
>
> Michael Martinsen wrote:
>> Hello
>>
>> Reading the docs, it seems to me that the @QueryParam should also
>> pick up params submitted using POST method.
>> I have a simple example which works when using GET, but not using
>> POST...
>>
>> Any thoughts on that?
>>
>> Thanks
>>
>> /Michael
>