users@jersey.java.net

Re: GET object parameter

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 07 Mar 2008 11:36:40 -0500

A GET request doesn't have an entity body so there's nothing to map to
an object.

Marc.

On Mar 7, 2008, at 11:23 AM, Jeff Miller wrote:

> First off I love this framework. One of my first questions is why
> does Jersey accept object parameters with @POST or @PUT but not for
> @GET.
>
> For Example
>
> @Path("search")
> public class Search {
> @GET
> public Payments getPayments(Payment payment) {
> // error
> ...
> }
>
> @POST
> public Payments getPayments(Payment payment) {
> // compiles
> ...
> }
> }
>
> Ideally I'd like to pass in an object to use for searching. Have I
> got something backwards? It would seem like it POST would work then
> GET would too...
>
> --
> Jeff Miller
> Software Engineer
> Atlatl, Inc.
> jmiller_at_myatlatl.com
> Tel: 919-384-0514
> Fax: 919-384-1475
>
> <
> jmiller
> .vcf
> >---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.