title: Jersey @HeaderParam null in POST
body: <p>I'm getting NULL @HeaderParam in my resource on a POST. However, Authentication filter intercepts the call before it reaches to the resource and successfully extracts header info. Same header info. turns out null in resource.</p>
  
  <p>It is failing in constructor and throwing NullPointerException.</p>
  
  <p>Code of resource class:</p>
  
  <pre><code>@Path("/profile")
  @Consumes(MediaType.APPLICATION_JSON)
  public class UserAccountEP {
  
      @HeaderParam("userId")
      public String userId;
  
      public UserAccountEP()
      {
          if(userId==null)
              throw new NullPointerException("UserId is null");
      }
  
  
      @POST
      @Path("/action")
      public void action(String ip) throws IOException {}
  </code></pre>
  
  <p>}</p>
  
  <p>Can someone please look into what I'm doing wrong?</p>
  
  <p>Thanks.</p>