- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for OnFailure (0.04 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
val exceptionRef = AtomicReference<Throwable>() val call = client.newCall(request) call.timeout().timeout(250, TimeUnit.MILLISECONDS) call.enqueue( object : Callback { override fun onFailure( call: Call, e: IOException, ) { exceptionRef.set(e) latch.countDown() } @Throws(IOException::class) override fun onResponse(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 10.6K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt
} else { responseCallback.onFailure(this@RealCall, e) } } catch (t: Throwable) { cancel() if (!signalledCallback) { val canceledException = IOException("canceled due to $t") canceledException.initCause(t) responseCallback.onFailure(this@RealCall, canceledException) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 17.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt
clientListener.setNextEventDelegate( object : WebSocketListener() { override fun onFailure( webSocket: WebSocket, t: Throwable, response: Response?, ): Unit = throw e }, ) newWebSocket() assertThat(testLogHandler.take()).isEqualTo("INFO: [WS client] onFailure") } @Test fun throwingOnMessageClosesImmediatelyAndFails() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 35.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/RealWebSocket.kt
return } // Apply the extensions. If they're unacceptable initiate a graceful shut down. // TODO(jwilson): Listeners should get onFailure() instead of onClosing() + onClosed(1010). val extensions = WebSocketExtensions.parse(response.headers) ******@****.***ions = extensions if (!extensions.isValid()) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 21.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt
* public void onResponse(Call call, Response response) throws IOException { * try (ResponseBody responseBody = response.body()) { * ... // Use the response. * } * } * * public void onFailure(Call call, IOException e) { * ... // Handle the failure. * } * }); * ``` * * These examples will not work if you're consuming the response body on another thread. In such
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:51:25 UTC 2025 - 11.6K bytes - Viewed (0) -
docs/changelogs/changelog_2x.md
the client. * **WebSocketListener has incompatible changes.** The `onOpen()` method is now called on the reader thread, so implementations must return before further websocket messages will be delivered. The `onFailure()` method now includes an HTTP response if one was returned. ## Version 2.4.0-RC1 _2015-05-16_ * **New HttpUrl API.** It's like `java.net.URL` but good. Note that
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 26.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt
throw AssertionError(e) } assert200Http2Response(response, "san.com") connection.get()!!.socket().close() latch4.countDown() } override fun onFailure( call: Call, e: IOException, ) { fail("") } }, ) val client2 = client .newBuilder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jun 19 11:44:16 UTC 2025 - 19.1K bytes - Viewed (0) -
docs/recipes.md
val request = Request.Builder() .url("http://publicobject.com/helloworld.txt") .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 {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FluentFuture.java
* {@snippet : * future.addCallback( * new FutureCallback<QueryResult>() { * public void onSuccess(QueryResult result) { * storeInCache(result); * } * public void onFailure(Throwable t) { * reportError(t); * } * }, executor); * } * * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 19.7K bytes - Viewed (0)