Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for calling (0.15 sec)

  1. okhttp-logging-interceptor/README.md

    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
    HttpLoggingInterceptor logging = new HttpLoggingInterceptor(new Logger() {
      @Override public void log(String message) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. docs/contribute/concurrency.md

    In OkHttp we expose a blocking API over a framed protocol. This document explains the code and policy that makes that work.
    
    ### Threads
    
    #### Application's calling thread
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

    import okio.Options
    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    /**
     * Reads a stream of [RFC 2046][rfc_2046] multipart body parts. Callers read parts one-at-a-time
     * until [nextPart] returns null. After calling [nextPart] any preceding parts should not be read.
     *
     * Typical use loops over the parts in sequence:
     *
     * ```kotlin
     * val response: Response = call.execute()
     * val multipartReader = MultipartReader(response.body!!)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

    import mockwebserver3.Stream
    import mockwebserver3.StreamHandler
    import okio.utf8Size
    
    private typealias Action = (Stream) -> Unit
    
    /**
     * A scriptable request/response conversation. Create the script by calling methods like
     * [receiveRequest] in the sequence they are run.
     */
    class MockStreamHandler : StreamHandler {
      private val actions = LinkedBlockingQueue<Action>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  5. docs/features/events.md

          long callId = nextCallId.getAndIncrement();
          System.out.printf("%04d %s%n", callId, call.request().url());
          return new PrintingEventListener(callId, System.nanoTime());
        }
      };
    
      final long callId;
      final long callStartNanos;
    
      public PrintingEventListener(long callId, long callStartNanos) {
        this.callId = callId;
        this.callStartNanos = callStartNanos;
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        expectedEvents += "ResponseHeadersEnd"
        expectedEvents += "ResponseBodyStart"
        expectedEvents += "ResponseBodyEnd"
        expectedEvents += "ConnectionReleased"
        expectedEvents += "CallEnd"
        assertThat(listener.recordedEventTypes()).isEqualTo(expectedEvents)
    
        // Confirm that the connection pool was not corrupted by making another call.
        makeSimpleCall()
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  7. docs/features/interceptors.md

    ### Application Interceptors
    
    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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 8.1K bytes
    - Viewed (0)
  8. docs/features/caching.md

    Caching
    =======
    
    OkHttp implements an optional, off by default, Cache. OkHttp aims for RFC correct and
    pragmatic caching behaviour, following common real-world browser like Firefox/Chrome and 
    server behaviour when ambiguous.
    
    # Basic Usage
    
    ```kotlin
      private val client: OkHttpClient = OkHttpClient.Builder()
          .cache(Cache(
              directory = File(application.cacheDir, "http_cache"),
              // $0.05 worth of phone storage in 2020
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/platform/android/DeferredSocketAdapter.kt

     * and initializing on first use.
     *
     * We use this because eager classpath checks cause confusion and excessive logging in Android,
     * and we can't rely on classnames after proguard, so are probably best served by falling through
     * to a situation of trying our least likely noisiest options.
     */
    class DeferredSocketAdapter(private val socketAdapterFactory: Factory) : SocketAdapter {
      private var delegate: SocketAdapter? = null
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

        call: Call,
        ioe: IOException,
      ) {
        logWithTime("responseFailed: $ioe")
    
        delegate.responseFailed(call, ioe)
      }
    
      override fun callEnd(call: Call) {
        logWithTime("callEnd")
    
        delegate.callEnd(call)
      }
    
      override fun callFailed(
        call: Call,
        ioe: IOException,
      ) {
        logWithTime("callFailed: $ioe")
    
        delegate.callFailed(call, ioe)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top