Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 337 for enqueue (0.09 sec)

  1. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

        val client = buildClient(clientCert, clientIntermediateCa.certificate)
        val socketFactory = buildServerSslSocketFactory()
        server.useHttps(socketFactory)
        server.requestClientAuth()
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .build(),
        )
        val call = client.newCall(Request.Builder().url(server.url("/")).build())
        val response = call.execute()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

              },
            )
            .build()
      }
    
      @AfterEach
      fun tearDown() {
        Thread.interrupted() // Clear interrupted state.
      }
    
      @Test
      fun interruptWritingRequestBody() {
        server.enqueue(MockResponse())
        server.start()
        val call =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .post(
                object : RequestBody() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

        server.useHttps(handshakeCertificates.sslSocketFactory())
        server.enqueue(
          MockResponse(
            headers =
              headersOf(
                "Last-Modified",
                formatDate(-1, TimeUnit.HOURS)!!,
                "Expires",
                formatDate(1, TimeUnit.HOURS)!!,
              ),
            body = "ABC.1",
          ),
        )
        server.enqueue(
          MockResponse(
            headers =
              headersOf(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt

      @BeforeEach
      fun before(server: MockWebServer) {
        this.server = server
      }
    
      @AfterEach
      fun after() {
        listener.assertExhausted()
      }
    
      @Test
      fun processResponse() {
        server.enqueue(
          MockResponse.Builder()
            .body(
              """
              |data: hey
              |
              |
              """.trimMargin(),
            ).setHeader("content-type", "text/event-stream")
            .build(),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/opensearch/extension/analysis/NGramSynonymTokenizer.java

                tokenizePartialBlock(nextStart, synonym.startOffset, afterSynonymProduced);
    
                // enqueue prev-synonym
                processPrevSynonym(synonym.startOffset, idx > 0 ? synonyms.get(idx - 1).endOffset : 0);
    
                if (expand) {
                    queue.add(synonym);
                }
    
                // enqueue synonyms
                bytesReader.reset(synonym.output.bytes, synonym.output.offset, synonym.output.length);
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 17K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

                server.useHttps(serverSslSocketFactory)
              } else if (socketMode == Channel) {
                socketFactory(ChannelSocketFactory())
              }
            }
            .build()
    
        server.enqueue(MockResponse(body = "abc"))
    
        @Suppress("HttpUrlsUsage")
        val url =
          if (socketMode is TlsInstance) {
            "https://$hostname:${server.port}/get"
          } else {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/DispatcherCleanupTest.kt

              call: Call,
              response: Response,
            ) {
              response.close()
            }
          }
        repeat(10_000) {
          okhttp.newCall(Request.Builder().url(server.url("/")).build()).enqueue(callback)
        }
        okhttp.dispatcher.executorService.shutdown()
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

          if (existingCall.host == host) return existingCall
        }
        return null
      }
    
      /**
       * Cancel all calls currently enqueued or executing. Includes calls executed both
       * [synchronously][Call.execute] and [asynchronously][Call.enqueue].
       */
      fun cancelAll() {
        this.withLock {
          for (call in readyAsyncCalls) {
            call.call.cancel()
          }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Jun 20 14:10:53 UTC 2024
    - 9K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

          return getResponseWithInterceptorChain()
        } finally {
          client.dispatcher.finished(this)
        }
      }
    
      override fun enqueue(responseCallback: Callback) {
        check(executed.compareAndSet(false, true)) { "Already Executed" }
    
        callStart()
        client.dispatcher.enqueue(AsyncCall(responseCallback))
      }
    
      override fun isExecuted(): Boolean = executed.get()
    
      private fun callStart() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

            .heldCertificate(localhostCertificate)
            .build();
        MockWebServer server = new MockWebServer();
        server.useHttps(serverCertificates.sslSocketFactory(), false);
        server.enqueue(new MockResponse());
    
        HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
            .addTrustedCertificate(localhostCertificate.certificate())
            .build();
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 02 14:04:37 UTC 2023
    - 2.1K bytes
    - Viewed (0)
Back to top