Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for HttpLoggingInterceptor (0.41 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

     *
     * The format of the logs created by this class should not be considered stable and may
     * change slightly between releases. If you need a stable logging format, use your own interceptor.
     */
    class HttpLoggingInterceptor
      @JvmOverloads
      constructor(
        private val logger: Logger = Logger.DEFAULT,
      ) : Interceptor {
        @Volatile private var headersToRedact = emptySet<String>()
    
    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)
  2. okhttp-logging-interceptor/api/logging-interceptor.api

    }
    
    public final class okhttp3/logging/HttpLoggingInterceptor$Level : java/lang/Enum {
    	public static final field BASIC Lokhttp3/logging/HttpLoggingInterceptor$Level;
    	public static final field BODY Lokhttp3/logging/HttpLoggingInterceptor$Level;
    	public static final field HEADERS Lokhttp3/logging/HttpLoggingInterceptor$Level;
    	public static final field NONE Lokhttp3/logging/HttpLoggingInterceptor$Level;
    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-android/src/main/kotlin/okhttp3/android/AndroidLogging.kt

    ) = LoggingEventListener.Factory { Log.println(priority, tag, it) }
    
    /**
     * An OkHttp [HttpLoggingInterceptor], with android Log as the target.
     */
    fun HttpLoggingInterceptor.Companion.androidLogging(
      priority: Int = Log.INFO,
      tag: String = "OkHttp",
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/README.md

    ```java
    HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
    logging.setLevel(Level.BASIC);
    OkHttpClient client = new OkHttpClient.Builder()
      .addInterceptor(logging)
      .build();
    ```
    
    You can change the log level at any time by calling `setLevel()`.
    
    To log to a custom location, pass a `Logger` instance to the constructor.
    ```java
    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)
  5. okhttp-android/api/okhttp-android.api

    	public static final fun androidLogging (Lokhttp3/logging/HttpLoggingInterceptor$Companion;ILjava/lang/String;)Lokhttp3/logging/HttpLoggingInterceptor;
    	public static final fun androidLogging (Lokhttp3/logging/LoggingEventListener$Companion;ILjava/lang/String;)Lokhttp3/logging/LoggingEventListener$Factory;
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 1.3K bytes
    - Viewed (1)
  6. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

      private lateinit var host: String
      private lateinit var url: HttpUrl
      private val networkLogs = LogRecorder()
      private val networkInterceptor = HttpLoggingInterceptor(networkLogs)
      private val applicationLogs = LogRecorder()
      private val applicationInterceptor = HttpLoggingInterceptor(applicationLogs)
      private var extraNetworkInterceptor: Interceptor? = null
    
      private fun setLevel(level: Level) {
        networkInterceptor.setLevel(level)
    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)
  7. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun httpLoggingInterceptorLevel() {
        val none: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.NONE
        val basic: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.BASIC
        val headers: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.HEADERS
        val body: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.BODY
      }
    
      @Test
      fun httpLoggingInterceptorLogger() {
    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)
  8. okhttp-android/src/test/kotlin/okhttp3/android/AndroidLoggingTest.kt

          }
    
      val request = Request("http://google.com/robots.txt".toHttpUrl())
    
      @Test
      fun testHttpLoggingInterceptor() {
        val interceptor =
          HttpLoggingInterceptor.androidLogging(tag = "testHttpLoggingInterceptor").apply {
            level = HttpLoggingInterceptor.Level.BASIC
          }
    
        val client = clientBuilder.addInterceptor(interceptor).build()
    
        try {
          client.newCall(request).execute()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  9. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

        logger.log("[$timeMs ms] $message")
      }
    
      open class Factory
        @JvmOverloads
        constructor(
          private val logger: HttpLoggingInterceptor.Logger = HttpLoggingInterceptor.Logger.DEFAULT,
        ) : EventListener.Factory {
          override fun create(call: Call): EventListener = LoggingEventListener(logger)
        }
    
      companion object
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

      fun headers() {
        var headers: Headers = Headers.of("", "")
        headers = Headers.of(mapOf("" to ""))
        val size: Int = headers.size()
      }
    
      @Test @Disabled
      fun httpLoggingInterceptor() {
        val interceptor = HttpLoggingInterceptor()
        val level = interceptor.getLevel()
      }
    
      @Test @Disabled
      fun httpUrl() {
        val httpUrl: HttpUrl = HttpUrl.get("")
        val url: URL = httpUrl.url()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
Back to top