JAX-RS 2: Adding HTTP Headers With WriterInterceptor

With a WriterInterceptor implementation you can easily post process the response and so modify or add HTTP headers:

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting

NEW online workshop: Web Components training (online)

Airport MUC workshops: Java EE 8, Java 9: Bootstrap, Effective, Architectures, Single Page Apps, Progressive Web Apps, HTML 5, ES 6, CSS 3 and Microservices

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns


Hi, cool feature. I've never used it.
What's the difference between WriteInterceptor and ResponseFilter?

Posted by Tomasz on March 18, 2015 at 10:15 PM CET #

Is there a way to add headers via interceptors when use JAX RS Client API?

Posted by Alexandr on October 08, 2015 at 05:16 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments