title: REST Call with list of headers
body: <p>I have the following code snippet for invoking rest call. I have around 8 headers to pass on for this rest call. But the problem is that it is difficult to manage. If in case the list of headers are increased in future, I need to change <code>evaluateChange</code> method signature to include the additional headers as method <code>params</code>.</p>
  
  <pre><code>@Path("/v1/restclienturi/")
  @Consumes({ MediaType.APPLICATION_JSON })
  @Produces({ MediaType.APPLICATION_JSON })
  public interface RestClient {
  
      @POST
      @Path("/samplecall/evaluate")
      Response evaluateChange(
              @HeaderParam("HEADER1") String header1,
              @HeaderParam("HEADER2") String header2,
              @HeaderParam("HEADER3") String header3,
              @HeaderParam("HEADER4") String header4,
              @HeaderParam("HEADER5") String header5,
              @HeaderParam("HEADER6") String header6,
              @HeaderParam("HEADER7") String header7,
              @HeaderParam("HEADER8") String header8,
              @Context HttpServletResponse response, Request request);
  }
  </code></pre>
  
  <p>Please provide your thoughts or code snippet to accommodate this. </p>
  
  <p>I tried the following code snippet but it did not work(where headerMap contains all the 8 headers in it):</p>
  
  <pre><code>@Path("/v1/restclienturi/")
  @Consumes({ MediaType.APPLICATION_JSON })
  @Produces({ MediaType.APPLICATION_JSON })
  public interface RestClient {
  
      @POST
      @Path("/samplecall/evaluate")
      Response evaluateChange(
              @RequestHeader Map&lt;String, String&gt; headerMap,
              @Context HttpServletResponse response, Request request);
  }
  </code></pre>