title: Retrofit 2.0 headers authentication
body: <pre><code>private void setUpRestClient() {
         OkHttpClient client = new OkHttpClient();
         client.interceptors().add(new Interceptor() {
             @Override
             public Response intercept(Chain chain) throws IOException {
                 Request original = chain.request();
                 Request request = original.newBuilder()
                         .header("Accept", "application/pyur.v1")
                         .header("Authorization", new SharedPreferencesUtil(getBaseContext()).getToken())
                         .header("Content-Type", "application/json")
                         .method(original.method(),original.body())
                         .build();
                 return chain.proceed(request);
             }
         });
         RestClient.getInstance().configureRestAdapter(this, getResources().getString(R.string.base_url),client);
     }
  
  public void configureRestAdapter(final Context context, String baseUrl, OkHttpClient client) {
      Gson gson = new GsonBuilder()
              .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
              .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
              .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
              .create();
      Retrofit retrofit = new Retrofit.Builder()
              .baseUrl(baseUrl)
              .addConverterFactory(GsonConverterFactory.create(gson))
              .client(client)
              .build();
      service = retrofit.create(NetworkServiceInterface.class);
  }
  </code></pre>
  
  <p>This now gives me a failure return in Retrofit 2.0, originally I had it without the "Authorization" header and it was giving me unauthorized, which is understandable. But now I'm authorizing it with my auth token and it fails. New to Retrofit 2.0, thanks --</p>