Adam Bien's Weblog

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 workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

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
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License