title: How to dynamically set headers in Retrofit (Android)
body: <p>I am using an API that uses an authorization scheme that requires a special "X-Authorization" header to be set to authenticate the request. For example, this Retrofit setup works perfectly for the user whose auth token is <code>abc123</code>:</p>
  
  <pre><code>@Headers("X-Authorization: abc123")
  @GET("/posts")
  Observable&lt;List&lt;Post&gt;&gt; get_posts();
  </code></pre>
  
  <p>I cache the user's X-Authorization token, so I have access to that, however, I can't just drop it in the @Headers declaration.</p>
  
  <pre><code>@Headers("X-Authorization: " + token)
  @GET("/posts")
  Observable&lt;List&lt;Post&gt;&gt; get_posts();
  </code></pre>
  
  <p>I get a compile error here: <code>Error:(41, 34) error: element value must be a constant expression</code></p>
  
  <p>Any ideas on how I could get around this?</p>