Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for LoggingInterceptor (0.15 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Jan 01 15:55:32 UTC 2016
    - 2K bytes
    - Viewed (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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  3. okcurl/build.gradle.kts

    kotlin {
      sourceSets {
        val main by getting {
          resources.srcDir(copyResourcesTemplates.get().outputs)
        }
      }
    }
    
    dependencies {
      api(libs.kotlin.stdlib)
      api(projects.okhttp)
      api(projects.loggingInterceptor)
      api(libs.squareup.okio)
      implementation(libs.clikt)
      api(libs.guava.jre)
    
      testImplementation(projects.okhttpTestingSupport)
      testApi(libs.assertk)
      testImplementation(kotlin("test"))
    }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. okhttp-android/build.gradle.kts

      }
    
      kotlinOptions {
        jvmTarget = JavaVersion.VERSION_11.toString()
      }
    }
    
    dependencies {
      api(libs.squareup.okio)
      api(projects.okhttp)
      api(projects.loggingInterceptor)
      compileOnly(libs.androidx.annotation)
      compileOnly(libs.findbugs.jsr305)
      debugImplementation(libs.androidx.annotation)
      debugImplementation(libs.findbugs.jsr305)
      compileOnly(libs.animalsniffer.annotations)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 11:07:32 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. native-image-tests/build.gradle.kts

      implementation(libs.squareup.okio.fakefilesystem)
    
      implementation(projects.okhttp)
      implementation(projects.okhttpBrotli)
      implementation(projects.okhttpDnsoverhttps)
      implementation(projects.loggingInterceptor)
      implementation(projects.okhttpSse)
      implementation(projects.okhttpTestingSupport)
      implementation(projects.okhttpTls)
      implementation(projects.mockwebserver3)
      implementation(projects.mockwebserver)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 06 05:31:00 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. android-test/build.gradle.kts

      androidTestImplementation(projects.mockwebserver3Junit5)
      androidTestImplementation(projects.okhttpBrotli)
      androidTestImplementation(projects.okhttpDnsoverhttps)
      androidTestImplementation(projects.loggingInterceptor)
      androidTestImplementation(projects.okhttpSse)
      androidTestImplementation(projects.okhttpTls)
      androidTestImplementation(projects.okhttpAndroid)
      androidTestImplementation(libs.androidx.junit)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. okhttp/build.gradle.kts

      testImplementation(projects.mockwebserver3Junit4)
      testImplementation(projects.mockwebserver3Junit5)
      testImplementation(projects.mockwebserver)
      testImplementation(projects.loggingInterceptor)
      testImplementation(projects.okhttpBrotli)
      testImplementation(projects.okhttpDnsoverhttps)
      testImplementation(projects.okhttpIdnaMappingTable)
      testImplementation(projects.okhttpSse)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Jan 04 05:32:07 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
Back to top