- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 147 for onFailure (0.32 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
} fun processResponse(response: Response) { response.use { if (!response.isSuccessful) { listener.onFailure(this, null, response) return } val body = response.body if (!body.isEventStream()) { listener.onFailure( this, IllegalStateException("Invalid content-type: ${body.contentType()}"), response, )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
@Override public void onSuccess(String result) { fail("Was not expecting onSuccess() to be called."); } @Override public void onFailure(Throwable t) { synchronized (monitor) { assertFalse(called); assertThat(t).isInstanceOf(CancellationException.class); called = true; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 6.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/AutobahnTester.kt
webSocket: WebSocket, code: Int, reason: String, ) { webSocket.close(1000, null) latch.countDown() } override fun onFailure( webSocket: WebSocket, t: Throwable, response: Response?, ) { t.printStackTrace(System.out) latch.countDown() } }, )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt
callback.onFailure( hostname, UnknownHostException(e.message).apply { initCause(e) }, ) } }, ) } catch (e: Exception) { // Handle any errors that might leak out // https://issuetracker.google.com/issues/319957694 callback.onFailure( hostname,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 10:07:48 UTC 2024 - 2.8K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/RtmSession.java
webSocket.close(1000, null); System.out.println("onClose (" + code + "): " + reason); } @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) { // TODO(jwilson): can I read the response body? Do I have to? System.out.println("onFailure " + response); } @Override public void close() throws IOException { if (webSocket == null) return; WebSocket webSocket;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Nov 19 20:16:58 UTC 2016 - 2.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/AsyncDns.kt
*/ fun onResponse( hostname: String, addresses: List<InetAddress>, ) /** * Returns an error for the DNS query. */ fun onFailure( hostname: String, e: IOException, ) } /** * Class of DNS addresses, such that clients that treat these differently, such * as attempting IPv6 first, can make such decisions. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt
events.add(Closed(code, reason)) } } override fun onFailure( webSocket: WebSocket, t: Throwable, response: Response?, ) { Platform.get().log("[WS $name] onFailure", Platform.INFO, t) val delegate = delegate if (delegate != null) { this.delegate = null delegate.onFailure(webSocket, t, response) } else { events.add(Failure(t, response)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.9K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
get().log("[ES] onClosed", Platform.INFO, null) events.add(Closed) drainCancelQueue(eventSource) } override fun onFailure( eventSource: EventSource, t: Throwable?, response: Response?, ) { get().log("[ES] onFailure", Platform.INFO, t) events.add(Failure(t, response)) drainCancelQueue(eventSource) } private fun drainCancelQueue(eventSource: EventSource) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java
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 { try (ResponseBody body = response.body()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 6.1K bytes - Viewed (0)