Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 37 for onResponse (0.21 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              completionLatch.countDown()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              response.close()
              completionLatch.countDown()
            }
          }
        call.enqueue(callback)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.5K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

        val request = Request.Builder().url(sanUrl).build()
        val call1 = client1.newCall(request)
        call1.enqueue(
          object : Callback {
            @Throws(IOException::class)
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              try {
                // Wait until request2 acquires the connection before we destroy it violently.
                latch3.await()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

            var signalledCallback = false
            timeout.enter()
            try {
              val response = getResponseWithInterceptorChain()
              signalledCallback = true
              responseCallback.onResponse(this@RealCall, response)
            } catch (e: IOException) {
              if (signalledCallback) {
                // Do not signal the callback twice!
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  4. docs/recipes.md

                .build()
    
            client.newCall(request).enqueue(object : Callback {
              override fun onFailure(call: Call, e: IOException) {
                e.printStackTrace()
              }
    
              override fun onResponse(call: Call, response: Response) {
                response.use {
                  if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
                  for ((name, value) in response.headers) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/RealWebSocket.kt

            .header("Sec-WebSocket-Extensions", "permessage-deflate")
            .build()
        call = RealCall(webSocketClient, request, forWebSocket = true)
        call!!.enqueue(
          object : Callback {
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              val socket =
                try {
                  checkUpgradeSuccess(response)
                } catch (e: IOException) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 21.6K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              fail("")
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ): Unit = throw IOException("a")
          },
        )
        assertThat(testLogHandler.take())
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 147.4K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      @Test
      fun callback() {
        val callback =
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) = TODO()
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) = TODO()
          }
      }
    
      @Test
      fun certificatePinner() {
        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 47K bytes
    - Viewed (0)
  8. okhttp/src/androidMain/baseline-prof.txt

    HSPLokhttp3/JvmCallExtensionsKt$executeAsync$2$2$onResponse$1;-><init>(Lokhttp3/Call;)V
    HSPLokhttp3/JvmCallExtensionsKt$executeAsync$2$2;-><init>(Lkotlinx/coroutines/CancellableContinuation;)V
    HSPLokhttp3/JvmCallExtensionsKt$executeAsync$2$2;->onFailure(Lokhttp3/Call;Ljava/io/IOException;)V
    HSPLokhttp3/JvmCallExtensionsKt$executeAsync$2$2;->onResponse(Lokhttp3/Call;Lokhttp3/Response;)V
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Dec 30 23:28:56 UTC 2024
    - 127.9K bytes
    - Viewed (1)
  9. docs/changelogs/changelog_2x.md

        headers, and to manually clear the cache.
    
     *  **Request cancellation fixes.** This update fixes a bug where synchronous
        requests couldn't be canceled by tag. This update avoids crashing when
        `onResponse()` throws an `IOException`. That failure will now be logged
        instead of notifying the thread's uncaught exception handler. We've added a
        new API, `Call.isCanceled()` to check if a call has been canceled.
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/opensearch/client/SearchEngineClient.java

         */
        public void refresh(final String... indices) {
            client.admin().indices().prepareRefresh(indices).execute(new ActionListener<RefreshResponse>() {
                @Override
                public void onResponse(final RefreshResponse response) {
                    if (logger.isDebugEnabled()) {
                        logger.debug(() -> "Refreshed " + stream(indices).get(stream -> stream.collect(Collectors.joining(", "))));
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Fri Nov 28 16:29:12 UTC 2025
    - 122.4K bytes
    - Viewed (1)
Back to top