Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for redactHeader (0.1 sec)

  1. okhttp-logging-interceptor/README.md

    a non-production environment.
    
    You can redact headers that may contain sensitive information by calling `redactHeader()`.
    ```java
    logging.redactHeader("Authorization");
    logging.redactHeader("Cookie");
    ```
    
    Download
    --------
    
    ```kotlin
    implementation("com.squareup.okhttp3:logging-interceptor:5.1.0")
    ```
    
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

            private class DefaultLogger : Logger {
              override fun log(message: String) {
                Platform.get().log(message)
              }
            }
          }
        }
    
        fun redactHeader(name: String) {
          val newHeadersToRedact = TreeSet(String.CASE_INSENSITIVE_ORDER)
          newHeadersToRedact += headersToRedact
          newHeadersToRedact += name
          headersToRedact = newHeadersToRedact
        }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 21 14:27:04 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

          HttpLoggingInterceptor(networkLogs).setLevel(
            Level.HEADERS,
          )
        networkInterceptor.redactHeader("sEnSiTiVe")
        val applicationInterceptor =
          HttpLoggingInterceptor(applicationLogs).setLevel(
            Level.HEADERS,
          )
        applicationInterceptor.redactHeader("sEnSiTiVe")
        client =
          OkHttpClient
            .Builder()
            .addNetworkInterceptor(networkInterceptor)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 21 14:27:04 UTC 2025
    - 37.5K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun httpLoggingInterceptor() {
        var interceptor: HttpLoggingInterceptor = HttpLoggingInterceptor()
        interceptor = HttpLoggingInterceptor(HttpLoggingInterceptor.Logger.DEFAULT)
        interceptor.redactHeader("")
        interceptor.level = HttpLoggingInterceptor.Level.BASIC
        var level: HttpLoggingInterceptor.Level = interceptor.level
        interceptor.intercept(newInterceptorChain())
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
Back to top