Hi
Consider
GET /somepath
@GET
public Response get(@QueryParam("a") @DefaultValue("1") String a) {}
public class ContainerResponseFilterImpl implements
ContainerResponseFilter {
@Context UriInfo ui;
String a = ui.getQueryParameters().getFirst("a");
assertEquals("1", a);
}
Does it make sense ? It appears to me that, assuming
get(@QueryParam("a") @DefaultValue("1") String a)
has been invoked, the filter implementation should see the value of the
'a' parameter exactly the way the application code sees it.
FYI, a user wanted to see the query parameters in the response filter
context and it took a lot of time to figure out why the injected UriInfo
was not providing the expected query parameters.
If you agree then I'll open a 2.1 JIRA to get UriInfo docs tweaked a
bit. Actually, same would apply to HttpHeaders injected into the
outbound filters (as well as to ContainerRequestContext available to the
outbound filters)
Thanks, Sergey