Using @Headers with dynamic values in Feign client + Spring Cloud (Brixton RC2) : <p>Is it possible to set dynamic values to a header ?</p>

<pre><code>@FeignClient(name="Simple-Gateway")
interface GatewayClient {
    @Headers("X-Auth-Token: {token}")
    @RequestMapping(method = RequestMethod.GET, value = "/gateway/test")
        String getSessionId(@Param("token") String token);
    }
</code></pre>

<p>Registering an implementation of RequestInterceptor adds the header but there is no way of setting the header value dynamically</p>

<pre><code>@Bean
    public RequestInterceptor requestInterceptor() {

        return new RequestInterceptor() {

            @Override
            public void apply(RequestTemplate template) {

                template.header("X-Auth-Token", "some_token");
            }
        };
    } 
</code></pre>

<p>I found the following issue on github and one of the commenters (<strong>lpborges</strong>) was trying to do something similar using headers in <code>@RequestMapping</code> annotation.</p>

<p><a href="https://github.com/spring-cloud/spring-cloud-netflix/issues/288" rel="noreferrer">https://github.com/spring-cloud/spring-cloud-netflix/issues/288</a></p>

<p>Kind Regards</p>
