Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 8 of 8 for LoggingInterceptor (0.99 seconds)

  1. samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java

          .addInterceptor(new LoggingInterceptor())
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        Response response = client.newCall(request).execute();
        response.body().close();
      }
    
      private static class LoggingInterceptor implements Interceptor {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Jan 01 15:55:32 GMT 2016
    - 2K bytes
    - Click Count (0)
  2. docs/features/interceptors.md

    Interceptors are registered as either _application_ or _network_ interceptors. We'll use the `LoggingInterceptor` defined above to show the difference.
    
    Register an _application_ interceptor by calling `addInterceptor()` on `OkHttpClient.Builder`:
    
    ```java
    OkHttpClient client = new OkHttpClient.Builder()
        .addInterceptor(new LoggingInterceptor())
        .build();
    
    Request request = new Request.Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 8.1K bytes
    - Click Count (0)
  3. docs/changelogs/changelog_2x.md

         </dependency>
         ```
    
        Configure basic logging like this:
    
        ```java
        HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
        loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);
        client.networkInterceptors().add(loggingInterceptor);
        ```
    
        **Warning:** Avoid `Level.HEADERS` and `Level.BODY` in production because
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Click Count (0)
  4. android-test/build.gradle.kts

      testImplementation(libs.junit)
      testImplementation(libs.junit.ktx)
      testImplementation(libs.assertk)
      testImplementation(projects.okhttpTls)
      "friendsTestImplementation"(projects.loggingInterceptor)
      testImplementation(libs.androidx.test.runner)
      testImplementation(libs.robolectric)
      testImplementation(libs.androidx.espresso.core)
      testImplementation(libs.square.okio.fakefilesystem)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 3.8K bytes
    - Click Count (2)
  5. module-tests/build.gradle.kts

    }
    
    dependencies {
      implementation(projects.okhttp)
      implementation(projects.loggingInterceptor)
    
      // Force version 26.0.2-1 which is a proper JPMS module, unlike transitive 13.0
      implementation(libs.jetbrains.annotations)
    
      testImplementation(projects.okhttp)
      testImplementation(projects.loggingInterceptor)
      testImplementation(projects.mockwebserver3)
      testImplementation(projects.mockwebserver3Junit5)
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  6. okcurl/build.gradle.kts

      }
    
    configure<JavaPluginExtension> {
      sourceSets.getByName("main").resources.srcDir(copyResourcesTemplates.get().outputs)
    }
    
    dependencies {
      api(projects.okhttp)
      api(projects.loggingInterceptor)
      api(libs.square.okio)
      implementation(libs.clikt)
    
      testImplementation(projects.okhttpTestingSupport)
      testImplementation(projects.mockwebserver3)
      testImplementation(projects.mockwebserver3Junit5)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Feb 05 09:17:33 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  7. okhttp-osgi-tests/build.gradle.kts

    }
    
    dependencies {
      implementation(projects.okhttp)
      implementation(projects.okhttpBrotli)
      implementation(projects.okhttpCoroutines)
      implementation(projects.okhttpDnsoverhttps)
      implementation(projects.loggingInterceptor)
      implementation(projects.okhttpSse)
      implementation(projects.okhttpTls)
      implementation(projects.okhttpUrlconnection)
    
      testImplementation(projects.okhttpTestingSupport)
      testImplementation(libs.junit)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Feb 05 09:17:33 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  8. okhttp/build.gradle.kts

            implementation(libs.openjsse)
            implementation(libs.square.moshi.kotlin)
            implementation(libs.square.moshi)
            implementation(libs.square.okio.fakefilesystem)
            implementation(projects.loggingInterceptor)
            implementation(projects.mockwebserver)
            implementation(projects.mockwebserver3)
            implementation(projects.mockwebserver3Junit4)
            implementation(projects.mockwebserver3Junit5)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Feb 04 22:16:39 GMT 2026
    - 11.4K bytes
    - Click Count (0)
Back to Top