- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 for onResponse (0.08 sec)
-
okhttp/src/main/kotlin/okhttp3/AsyncDns.kt
interface Callback { /** * Return addresses for a dns query for a single class of IPv4 (A) or IPv6 (AAAA). * May be an empty list indicating that the host is unreachable. */ fun onResponse( hostname: String, addresses: List<InetAddress>, ) /** * Returns an error for the DNS query. */ fun onFailure( hostname: String, e: IOException, )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt
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")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
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/src/test/java/okhttp3/DispatcherCleanupTest.kt
val okhttp = OkHttpClient() val callback = object : Callback { override fun onFailure( call: Call, e: IOException, ) {} override fun onResponse( call: Call, response: Response, ) { response.close() } } repeat(10_000) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp-coroutines/src/main/kotlin/okhttp3/coroutines/ExecuteAsync.kt
object : Callback { override fun onFailure( call: Call, e: IOException, ) { continuation.resumeWithException(e) } override fun onResponse( call: Call, response: Response, ) { continuation.resume(response) { response.closeQuietly() } } }, )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java
.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()) { // Consume and discard the response body. body.source().readByteString(); } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 6.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RecordingCallback.kt
call: Call, e: IOException, ) { responses.add(RecordedResponse(call.request(), null, null, null, e)) (this as Object).notifyAll() } @Synchronized override fun onResponse( call: Call, response: Response, ) { val body = response.body.string() responses.add(RecordedResponse(call.request(), response, null, body, null)) (this as Object).notifyAll() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Callback.kt
* necessarily indicate application-layer success: `response` may still indicate an unhappy HTTP * response code like 404 or 500. */ @Throws(IOException::class) fun onResponse( call: Call, response: Response, )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java
.build(); client.newCall(request).enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) { e.printStackTrace(); } @Override public void onResponse(Call call, Response response) throws IOException { try (ResponseBody responseBody = response.body()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.9K bytes - Viewed (0)