users@jersey.java.net

Re: [Jersey] Lists as QueryParams

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Thu, 28 Jan 2010 10:24:03 +0100

but from the REST perspective, GET should be idempotent.. so there is
no meaning in submitting data with GET unless your form data will
produce no change in the server side ....



On Thu, Jan 28, 2010 at 10:22 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> On Jan 28, 2010, at 10:17 AM, Felipe Gaścho wrote:
>
>> but the only way of submitting HTML forms data to a server is via POST,
>> right ?
>>
>
> No, the "form data set" can be submitted using GET or POST depending on the
> HTML form markup:
>
>  http://www.w3.org/TR/html401/interact/forms.html#h-17.13.1
>
> Paul.
>
>
>> * it is different, but in the JAX-RS context.. it sounds like: HTML
>> Form is a client side of a POST in the server side :)
>>
>> On Thu, Jan 28, 2010 at 10:13 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>>>
>>> On Jan 28, 2010, at 9:06 AM, Felipe Gaścho wrote:
>>>
>>>>> IIRC, the way you have it now matches what a HTML form would produce.
>>>>> One
>>>>> thing to
>>>>
>>>> +1
>>>>
>>>> Form is the way to go ...
>>>>
>>>
>>> Clarification: HTML forms != HTTP POST
>>>
>>> HTML forms can describe how clients make GET requests using query
>>> parameters
>>> or POST requests using form parameters encoded in the request entity.
>>>
>>> Paul.
>>>
>>>> an example:
>>>>
>>>> @POST
>>>> @Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>>>> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
>>>> public Response insert(@Context UriInfo info, @Context HttpHeaders
>>>> headers,
>>>>               @FormParam("login") String login,
>>>>               @FormParam("password") String password,
>>>>               @FormParam("email") String email, @FormParam("name")
>>>> String
>>>> name,
>>>>               @FormParam("confirmationUrl") String url,
>>>>               @FormParam("key") String key, @FormParam("locale") String
>>>> locale) { ... }
>>>>
>>>>
>>>>
>>>> http://kenai.com/projects/puj/sources/arena/content/arena-http/src/main/java/com/kenai/puj/arena/http/PujUserResource.java
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>>
>>
>>
>>
>> --
>> ------------------------------------------
>>  Felipe Gaścho
>>  10+ Java Programmer
>>  CEJUG Senior Advisor
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>



-- 
------------------------------------------
   Felipe Gaścho
   10+ Java Programmer
   CEJUG Senior Advisor