title: Get headers feign netflix
body: <p>I'm using <a href="https://github.com/OpenFeign/feign" rel="nofollow">netflix feign</a> to communicate microservices.</p>
  
  <p>So my Microservice A has an operation 'OperationA' which is consumed by the Microservice B and it passes one param by header named X-Total to B</p>
  
  <pre><code> MultiValueMap&lt;String, String&gt; headers = new LinkedMultiValueMap&lt;&gt;();
   headers.add("X-Total", page.getTotalSize()); 
  </code></pre>
  
  <p>My client interface is as next:</p>
  
  <pre><code>@Headers({
      "Content-Type: " + MediaType.APPLICATION_JSON_UTF8_VALUE
  })
  @RequestLine("GET Dto/")
  List&lt;Dto&gt; search();
  
  static DtoClient connect() {
      return Feign.builder()
          .encoder(new GsonEncoder())
          .decoder(new GsonDecoder())
          .target(ConditionTypeClient.class, Urls.SERVICE_URL.toString());
  }
  </code></pre>
  
  <p>Then I've get the list of dto, but I don't know how to get the header X-TOTAL param:</p>
  
  <pre><code>public List&lt;Dto&gt; search() {
      DtoClient client = DtoClient.connect();
      return client.search();
  }
  </code></pre>
  
  <p>How do I get the header params?</p>