Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for LoggingInterceptor (0.07 sec)

  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 {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jan 01 15:55:32 UTC 2016
    - 2K bytes
    - Viewed (0)
  2. 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.squareup.okio.fakefilesystem)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 20:01:04 UTC 2025
    - 3.8K bytes
    - Viewed (2)
  3. 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()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  4. okcurl/build.gradle.kts

    }
    
    kotlin {
      sourceSets {
        val main by getting {
          resources.srcDir(copyResourcesTemplates.get().outputs)
        }
      }
    }
    
    dependencies {
      api(projects.okhttp)
      api(projects.loggingInterceptor)
      api(libs.squareup.okio)
      implementation(libs.clikt)
    
      testApi(libs.assertk)
      testImplementation(kotlin("test"))
    }
    
    configure<AnimalSnifferExtension> {
      isIgnoreFailures = true
    }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 22 20:31:49 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  5. 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)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 08:17:18 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  6. 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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
  7. okhttp/build.gradle.kts

            implementation(projects.mockwebserver3Junit4)
            implementation(projects.mockwebserver3Junit5)
            implementation(projects.mockwebserver)
            implementation(projects.loggingInterceptor)
            implementation(projects.okhttpBrotli)
            implementation(projects.okhttpDnsoverhttps)
            implementation(projects.okhttpIdnaMappingTable)
            implementation(projects.okhttpSse)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 03:59:03 UTC 2025
    - 9.4K bytes
    - Viewed (0)
Back to top