jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Response headers are writable without a builder

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 06 Mar 2012 12:14:58 -0500

On 3/5/12 3:38 PM, Santiago Pericas-Geertsen wrote:
>
> On Mar 5, 2012, at 10:56 AM, Bill Burke wrote:
>
>> Another thing that sucks about Response, ResponseBuilder, and modifying them in filters is that Response.getMetadata() allows you to modify the headers directly on the Response.
>
> How so? It states that it's equivalent to getHeaders().asMap() which returns a read-only map.
>

 From the Javadoc:

"* Get metadata associated with the response as a map. The returned map
* may be subsequently modified by the JAX-RS runtime."

Bill

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com