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


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

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