Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 277 for enqueue0 (0.11 sec)

  1. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

                  }
                },
              ),
            )
            .sslSocketFactory(sslSocketFactory, handshakeCertificates.trustManager)
            .build()
    
        server.enqueue(MockResponse(body = "abc1"))
        server.enqueue(MockResponse(body = "abc2"))
    
        val request = Request(server.url("/"))
    
        client.newCall(request).execute().use { response ->
          assertEquals(200, response.code)
        }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

    class DevServer {
      val handshakeCertificates = TlsUtil.localhost()
    
      val server =
        MockWebServer().apply {
          useHttps(handshakeCertificates.sslSocketFactory(), false)
    
          enqueue(
            MockResponse()
              .setResponseCode(HTTP_MOVED_TEMP)
              .setHeader("Location", "https://www.google.com/robots.txt"),
          )
        }
    
      val clientCertificates =
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/FailingCall.kt

     */
    package okhttp3
    
    import okio.Timeout
    
    open class FailingCall : Call {
      override fun request(): Request = error("unexpected")
    
      override fun execute(): Response = error("unexpected")
    
      override fun enqueue(responseCallback: Callback): Unit = error("unexpected")
    
      override fun cancel(): Unit = error("unexpected")
    
      override fun isExecuted(): Boolean = error("unexpected")
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. docs/contribute/debug_logging.md

    [2020-01-01 00:00:00] << 0x00000003     0 DATA          END_STREAM
    [2020-01-01 00:00:00] << 0x00000000     8 GOAWAY
    [2020-01-01 00:00:05] << 0x00000000     8 GOAWAY
    ```
    
    ### Task Runner Logging 
    
    This logs task enqueues, starts, and finishes.
    
    ```
    [2020-01-01 00:00:00] Q10000 scheduled after   0 µs: OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 starting              : OkHttp ConnectionPool
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Feb 06 16:35:36 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  5. native-image-tests/src/main/kotlin/okhttp3/SampleTest.kt

      val clientRule = OkHttpClientTestRule()
    
      @Test
      fun passingTest() {
        assertThat("hello").isEqualTo("hello")
      }
    
      @Test
      fun testMockWebServer(server: MockWebServer) {
        server.enqueue(MockResponse(body = "abc"))
    
        val client = clientRule.newClient()
    
        client.newCall(Request(url = server.url("/"))).execute().use {
          assertThat(it.body.string()).isEqualTo("abc")
        }
      }
    
      @Test
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/LoomTest.kt

        return Executors::class.java.getMethod("newVirtualThreadPerTaskExecutor").invoke(null) as ExecutorService
      }
    
      @Test
      fun testRequest() {
        server.enqueue(MockResponse())
    
        val request = Request(server.url("/"))
    
        client.newCall(request).execute().use {
          assertThat(it.code).isEqualTo(200)
        }
      }
    
      @Test
      fun testIfSupported() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Serializes execution of tasks, somewhat like an "asynchronous {@code synchronized} block." Each
     * {@linkplain #submit enqueued} callable will not be submitted to its associated executor until the
     * previous callable has returned -- and, if the previous callable was an {@link AsyncCallable}, not
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 01 21:46:34 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/RecordingCallback.kt

        responses.add(RecordedResponse(call.request(), response, null, body, null))
        (this as Object).notifyAll()
      }
    
      /**
       * Returns the recorded response triggered by `request`. Throws if the response isn't
       * enqueued before the timeout.
       */
      @Synchronized
      fun await(url: HttpUrl): RecordedResponse {
        val timeoutMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TIMEOUT_MILLIS
        while (true) {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/tlsconfig.go

    	utilruntime.HandleError(fmt.Errorf("%v failed with : %v", dsKey, err))
    	c.queue.AddRateLimited(dsKey)
    
    	return true
    }
    
    // Enqueue a method to allow separate control loops to cause the certificate controller to trigger and read content.
    func (c *DynamicServingCertificateController) Enqueue() {
    	c.queue.Add(workItemKey)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

          .build();
    
      public void run() throws Exception {
        Request washingtonPostRequest = new Request.Builder()
            .url("https://www.washingtonpost.com/")
            .build();
        client.newCall(washingtonPostRequest).enqueue(new Callback() {
          @Override public void onFailure(Call call, IOException e) {
          }
    
          @Override public void onResponse(Call call, Response response) throws IOException {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Feb 16 23:20:49 UTC 2020
    - 6.1K bytes
    - Viewed (0)
Back to top