users@jersey.java.net

Re: [Jersey] curl problems with jersey

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 21 Sep 2009 09:00:22 -0400

-d sets form parameters in the body of the request whereas @QueryParam
extracts URI query parameters. Try @FormParam instead.

Marc.

On Sep 19, 2009, at 11:06 AM, Felipe Gaścho wrote:

> curl -d login=fgaucho -d password=test -d email=fgaucho_at_gmail.com -d
> name="Felipe Gaścho"
> http://fgaucho.dyndns.org:8080/arena-http/user/create
>
> All parameter are null on the server :( why ?
>
> @POST
> @Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
> @Path("create")
> public Response insert(@QueryParam("login") String login,
> @QueryParam("password") String password,
> @QueryParam("email") String email, @QueryParam("name") String
> name) {
>
> * I can debug and I see the method being called, with all params null
>
>
> * the create path will be removed, it is already the test of the re-
> test :)
>
> --
> Looking for a client application for this service:
> http://fgaucho.dyndns.org:8080/footprint-service/wadl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>