title: What is the Chain object in OkHttp Interceptors? Retrofit
body: <p>I am watching a tutorial on how to add headers with OkHttp Interceptors, but I am confused about a few things.</p>
  <ul>
  <li>What is a <code>Chain</code> object?</li>
  <li>What does <code>Request original = chain.request()</code> do?</li>
  <li>What does <code>return chain.proceed(request)</code> do?</li>
  </ul>
  <p>Code:</p>
  <pre><code>OkHttpClient.Builder httpClient = new OkHttpClient.Builder();  
  httpClient.addInterceptor(new Interceptor() {  
  @Override
  public Response intercept(Interceptor.Chain chain) throws IOException {
      Request original = chain.request();
  
      // Request customization: add request headers
      Request.Builder requestBuilder = original.newBuilder()
              .header(&quot;Authorization&quot;, &quot;auth-value&quot;); 
  
      Request request = requestBuilder.build();
      return chain.proceed(request);
  }
  });
  
  OkHttpClient client = httpClient.build();  
  </code></pre>