Hello,

I faced the need to send some headers that were identical for the service the were sent on. I thought that it'd be nice to have the ability to set default headers for the client in configuration.

Something like:

feign:
  client
    config:
      some-api:
        defaultHeaders: 
          headerName: [HeaderValue1, HeaderValue2]

I'd like to add the possibility to do this without writing code yourself. Of course you can write a RequetInterceptor yourself, and make something similar, but I think that it's much more convenient to have it directly in here.

I think It may be done with adding some additional field in FeignClientConfiguration & FeignClientFactoryBean (at the first glance)

Thank you for the feedback.

Comment From: timpamungkas

It will be nice. Most of my API needs to add apikey header so +1 for this

Comment From: IlyasYOY

I've tried to implement this, you can check this here! I wrote some tests, my solution seems to work fine.

I hope this helps!

Comment From: OlgaMaciaszek

Changes merged.