Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 83 for calling (0.17 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. 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)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

     * deterministic.
     *
     * This class ensures that at most one thread is running at a time. This is initially the JUnit test
     * thread, which yields its execution privilege while calling [runTasks], [runNextTask], or
     * [advanceUntil]. These functions don't return until the task threads are all idle.
     *
     * Task threads release their execution privilege in these ways:
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

        parts.nextPart()!!
        val partMno = parts.nextPart()!!
        assertThat(partMno.body.readUtf8()).isEqualTo("mnop")
    
        assertThat(parts.nextPart()).isNull()
      }
    
      @Test fun `cannot read part after calling nextPart`() {
        val multipart =
          """
          |--simple boundary
          |
          |abcd
          |efgh
          |ijkl
          |--simple boundary
          |
          |mnop
          |--simple boundary--
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  5. 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)
  6. docs/en/docs/tutorial/dependencies/index.md

    !!! tip
        You'll see what other "things", apart from functions, can be used as dependencies in the next chapter.
    
    Whenever a new request arrives, **FastAPI** will take care of:
    
    * Calling your dependency ("dependable") function with the correct parameters.
    * Get the result from your function.
    * Assign that result to the parameter in your *path operation function*.
    
    ```mermaid
    graph TB
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/TestLogHandler.kt

    import org.junit.rules.TestRule
    import org.junit.runner.Description
    import org.junit.runners.model.Statement
    
    /**
     * A log handler that records which log messages were published so that a calling test can make
     * assertions about them.
     */
    class TestLogHandler(
      private val logger: Logger,
    ) : TestRule, BeforeEachCallback, AfterEachCallback {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt

    import java.util.concurrent.LinkedBlockingQueue
    import java.util.logging.Logger
    import okhttp3.ExperimentalOkHttpApi
    
    /**
     * Default dispatcher that processes a script of responses. Populate the script by calling [enqueueResponse].
     */
    @ExperimentalOkHttpApi
    open class QueueDispatcher : Dispatcher() {
      protected val responseQueue: BlockingQueue<MockResponse> = LinkedBlockingQueue()
      private var failFastResponse: MockResponse? = null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        }
    
        if (queue.futureTasks.isNotEmpty()) {
          readyQueues.add(queue)
        }
      }
    
      /**
       * Returns an immediately-executable task for the calling thread to execute, sleeping as necessary
       * until one is ready. If there are no ready queues, or if other threads have everything under
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Request.kt

            this.url = url
          }
    
        /**
         * Sets the URL target of this request.
         *
         * @throws IllegalArgumentException if [url] is not a valid HTTP or HTTPS URL. Avoid this
         *     exception by calling [HttpUrl.parse]; it returns null for invalid URLs.
         */
        open fun url(url: String): Builder {
          return url(canonicalUrl(url).toHttpUrl())
        }
    
        /**
         * Sets the URL target of this request.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top