Set the http Accept header to the appropriate MIME type in your request.
On Sun, Jun 14, 2009 at 12:45 AM, James Lorenzen <jameslorenzen_at_gmail.com>wrote:
> How do you handle extension custom negotiation like foo.xml or foo.json
> automatically in jersey?
> I can't find any documentation on it. The only thing I have found is this
> thread, https://jersey.dev.java.net/servlets/ReadMsg?list=users&msgNo=2718,
> that references this issue,
> https://jersey.dev.java.net/issues/show_bug.cgi?id=108.
>
> My guess is the client calls foo.json.
> The REST method has two @Produces mime types for xml and json.
>
> @Produces({"application/xml", "application/json"}
>
>
> But how does the method know which one was requested by the client?
>
>