Should it @Context HttpHeaderswork with Interceptor?
I created a class RestfulClassesthat extends javax.ws.rs.core.Applicationand annotates it @javax.ws.rs.ApplicationPath("/api")- everything is pretty standard.
I also have a class added to handle a specific path, which itself works just fine. The problem is that I would like to check the incoming HTTP headers, and using sniffers sounds perfect.
My interceptor class is declared @Context HttpHeaders httpHeaders, but inside the method @AroundInvokethis property is null.
Should I expect this to work or am I missing something? Is there another way?
source
share