Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 80 for cancelFn (0.17 sec)

  1. docs/changelogs/changelog_2x.md

        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.
    
     *  New: Update `MultipartBuilder` to support content length.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  2. CHANGELOG.md

     *  Fix: Attempt to read the response body even if the server canceled the request. This will cause
        some calls to return nice error codes like `HTTP/1.1 429 Too Many Requests` instead of transport
        errors like `SocketException: Connection reset` and `StreamResetException: stream was reset:
        CANCEL`.
     *  New: Support OSGi metadata.
     *  Upgrade: [Okio 2.9.0][okio_2_9_0].
    
        ```kotlin
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

        inFinished: Boolean,
      ) {
        pushQueue.execute("$connectionName[$streamId] onHeaders") {
          val cancel = pushObserver.onHeaders(streamId, requestHeaders, inFinished)
          ignoreIoExceptions {
            if (cancel) writer.rstStream(streamId, ErrorCode.CANCEL)
            if (cancel || inFinished) {
              this.withLock {
                currentPushRequests.remove(streamId)
              }
            }
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/EventListenerTest.kt

            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        call.cancel()
        assertFailsWith<IOException> {
          call.execute()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("Canceled")
        }
        assertThat(listener.recordedEventTypes()).containsExactly(
          "Canceled",
          "CallStart",
          "CallFailed",
        )
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

      override fun callFailed(
        call: Call,
        ioe: IOException,
      ) = logEvent(CallFailed(System.nanoTime(), call, ioe))
    
      override fun canceled(call: Call) = logEvent(Canceled(System.nanoTime(), call))
    
      override fun satisfactionFailure(
        call: Call,
        response: Response,
      ) = logEvent(SatisfactionFailure(System.nanoTime(), call))
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  6. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

            }
          } catch (e: Exception) {
            val exception =
              when {
                canceled -> IOException("canceled", e)
                else -> e
              }
            listener.onFailure(this, exception, response)
            return
          }
          if (canceled) {
            listener.onFailure(this, IOException("canceled"), response)
          } else {
            listener.onClosed(this)
          }
        }
      }
    
    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)
  7. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

         *
         * If the server does not respond to each ping with a pong within `interval`, this client will
         * assume that connectivity has been lost. When this happens on a web socket the connection is
         * canceled and its listener is [notified][WebSocketListener.onFailure]. When it happens on an
         * HTTP/2 connection the connection is closed and any calls it is carrying
         * [will fail with an IOException][java.io.IOException].
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

        logWithTime("callEnd")
      }
    
      override fun callFailed(
        call: Call,
        ioe: IOException,
      ) {
        logWithTime("callFailed: $ioe")
      }
    
      override fun canceled(call: Call) {
        logWithTime("canceled")
      }
    
      override fun satisfactionFailure(
        call: Call,
        response: Response,
      ) {
        logWithTime("satisfactionFailure: $response")
      }
    
      override fun cacheHit(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

          printEvent("callEnd");
        }
    
        @Override public void callFailed(Call call, IOException ioe) {
          printEvent("callFailed");
        }
    
        @Override public void canceled(Call call) {
          printEvent("canceled");
        }
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  10. okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt

                    }
                  }.buffer()
              },
            )
            .build()
    
        var responseClosed = false
        var canceled = false
        var afterCallbackOnResponse: () -> Unit = {}
    
        override fun cancel() {
          canceled = true
        }
    
        override fun enqueue(responseCallback: Callback) {
          responseCallback.onResponse(this, response)
          afterCallbackOnResponse()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top