Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for redactHeader (0.26 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:4.12.0")
    ```
    
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/api/logging-interceptor.api

    	public fun intercept (Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
    	public final fun level (Lokhttp3/logging/HttpLoggingInterceptor$Level;)V
    	public final fun redactHeader (Ljava/lang/String;)V
    	public final fun redactQueryParams ([Ljava/lang/String;)V
    	public final fun setLevel (Lokhttp3/logging/HttpLoggingInterceptor$Level;)Lokhttp3/logging/HttpLoggingInterceptor;
    }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 4.5K bytes
    - Viewed (1)
  3. 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
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  4. 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)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/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
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
Back to top