users@jersey.java.net

[Jersey] Re: Conneg with Accept parameters

From: algermissen1971 <algermissen1971_at_me.com>
Date: Tue, 05 Apr 2011 12:31:42 +0000 (GMT)

On 05 Apr, 2011,at 02:27 PM, Tim Williams <williamstw_at_gmail.com> wrote:

> Does Jersey (or JAX-RS) support content negotiation based on Accept
> params[1]? Something similar to the qs support...
>
> @GET
> @Produces("application/myformat+xml; foo=bar")
> public Object getBarProfile() {
> ...
> }
>
> @GET
> @Produces("application/myformat+xml; foo=baz")
> public Object getBazProfile() {
> ...
> }
>
> Or any pointers to how one might extend it to get this behavior?
 
Do you intend to distinguish between the two? That would be wrong, because parameters (other than q) should not be considered in conneg.

Jersey behaves correctly.

Jan


>
>
> Thanks,
> --tim
>
> [1] - http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1