users@jsr311.java.net

Re: [Resteasy-developers] _at_QueryParam and POST

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 03 Jun 2008 09:07:20 -0400

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
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Resteasy-developers_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com