users@jersey.java.net

[Jersey] Media Type and Accept

From: Kevin Hale Boyes <kcboyes_at_gmail.com>
Date: Wed, 24 Sep 2014 09:31:26 -0600

I have an endpoint method that produces two output formats - XML and JSON.
i.e.,
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public MyModel getit() { ... }

When the request comes in Jersey decides what output to generate based on
the Accept request header. It processes the (possibly) complex list of
acceptable types with the quality factors.

Is there any way to get access to the decision it's made as to which output
format it will generate?

Thanks,
Kevin.