+1 Marek.
On 12/19/2011 04:31 PM, Bill Burke wrote:
> The MessageBodyHandlerContext.getHeaders() method needs to be removed. New methods in ReadFrom and WriteToHandler
> Context need to be added to match the corresponding MessageBodyReader and Writer interfaces:
>
> interface ReadFromHandlerContext {
>
> MultivaluedMap<String, String> getHeaders();
>
> }
>
> interface WriteToHandlerContext {
>
> MultivaluedMap<String, Object> getHeaders();
>
> }
>
> Why this change? Writers are allowed to add headers to the outgoing request (client) or response (server). In this
> scenario, they may want to interact using the Object representation of the header rather than the String based one.
>
> Readers will always be dealing with a String based representation of headers. Finally, this whole change maps 1-1 to
> the corresponding parameters that MessageBodyReader and MessageBodyWriters expect.
>
> http://java.net/jira/browse/JAX_RS_SPEC-151
>