users@jersey.java.net

Re: [Jersey] Getting post data as stream

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Sat, 22 Aug 2009 11:59:58 -0400

Sorry, just read your message again. If you want an InputStream then
just have a method parameter of that type without any annotations:

@POST
public someType someMethod(InputStream is) {...}

Marc.

On Aug 22, 2009, at 11:31 AM, Marc Hadley wrote:

> On Aug 21, 2009, at 6:00 PM, dloy wrote:
>
>> Is there a preferred way in Jersey to get the POST data (not as
>> query value)? I know you can use @Context HttpServletRequest
>> request - but I wasn't sure how that interacts with other Jersey
>> annotation?
>>
> The easiest way is to have a method parameter of type
> MultivaluedMap<String,String> with no annotations, that will get the
> values from the posted form data.
>
> Marc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>