title: How to use custom ApacheHttpClient with Feign?
body: <p>I've tried to add a custom HttpClient via configuration:</p>
  
  <pre><code> @Bean
   public CloseableHttpClient httpClient() {
      RequestConfig requestConfig = RequestConfig.custom()
                  .setConnectTimeout(15000)
                  .setConnectionRequestTimeout(15000)
                  .build();
  
      Header header = new BasicHeader("Test", "Test");
      Collection&lt;Header&gt; headers =Arrays.asList(header);        
      return HttpClients.custom()
                  .setDefaultRequestConfig(requestConfig)
                  .setDefaultHeaders(headers)
                  .build();
   }
  </code></pre>
  
  <p>but still, my custom added default header doesn't appear in the request.  </p>
  
  <p>My Feign client interface looks like below:</p>
  
  <pre><code>@FeignClient(name = "example", 
               url = "${client.example.api}", 
               decode404 = false, 
               configuration = FeignClientConfiguration.class)
  public interface ExampleFeignProxy{
  
      @PostMapping(path = "/create")
      @Headers("Content-Type: application/json")
      String Create(
              @RequestBody ExampleDTO exampleDto,
              @RequestHeader("access-token") String token);
  }
  </code></pre>
  
  <p>but when I make request to the <code>Create</code> method, request fails, when I inspect inside configuration.errordecoder, it shows feign is adding an extra header <code>Content-Length</code> also to the request. 
  How can I remove default headers from all methods inside my feign client?</p>
  
  <p>To make it clear - as shown above, only two headers should have been present on the request object </p>
  
  <ul>
  <li><p>Content-Type</p></li>
  <li><p>Access-Token</p></li>
  </ul>
  
  <p>but Feign somehow adds Content-Length as well.</p>
  
  <p>Is there a configuration somewhere I need to set?</p>