title: How to set fixed headers to the feign client instead of setting on request level
body: <p>I am using feign client for inter-service communication; question is I am able to send the method/request headers on request level meaning ex:</p>
  <pre><code>@FeignClient(name = &quot;product-service&quot;, url = &quot;https://jsonplaceholder.typicode.com/&quot;)
  public interface ProductClient {
  
      @GetMapping(&quot;/posts&quot;)
      List&lt;PostDTO&gt; fetchPosts(@RequestHeaders....);
  
      @GetMapping(&quot;/posts/{id}&quot;)
      List&lt;PostDTO&gt; fetchPostsById(@RequestHeaders...., @PathVariable(&quot;id&quot;)int id);
  </code></pre>
  <p>But as header is fixed, instead of sending the same value to each request; can we set it on class level; I tried below; it is not working</p>
  <pre><code>@FeignClient(name = &quot;product-service&quot;, url = &quot;https://jsonplaceholder.typicode.com/&quot;)
  @Headers({
          &quot;X-Ping: {token}&quot;
  })
  public interface ProductClient {
  
      @GetMapping(&quot;/posts&quot;)
      List&lt;PostDTO&gt; fetchPosts(@RequestHeaders....);
  
      @GetMapping(&quot;/posts/{id}&quot;)
      List&lt;PostDTO&gt; fetchPostsById(@RequestHeaders...., @PathVariable(&quot;id&quot;)int id);
  </code></pre>
  <p>Correct me with the API or an example.</p>