- Sort Score
- Result 10 results
- Languages All
Results 481 - 490 of 994 for executeOn (0.07 sec)
-
samples/guide/src/main/java/okhttp3/guide/GetExample.java
String run(String url) throws IOException { Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { return response.body().string(); } } public static void main(String[] args) throws IOException { GetExample example = new GetExample();
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java
System.out.println("REQUEST 1 (new connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } System.out.println("REQUEST 2 (pooled connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); }Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 5.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt
} fail("Expected connection to be closed") } }, ).build(), ) interruptLater(500) assertFailsWith<IOException> { call.execute() } } @Test fun interruptReadingResponseBody() { val responseBodySize = 8 * 1024 * 1024 // 8 MiB. server.enqueue( MockResponse()Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 6.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ClosingFuture.java
} }); executor.execute(task); return new ClosingFuture<>(task, closeables); } /** * Starts a {@link ClosingFuture} pipeline by submitting a callable block to an executor. * * @throws java.util.concurrent.RejectedExecutionException if the task cannot be scheduled for * execution * @since 30.1 */Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 23 15:26:56 UTC 2025 - 97.8K bytes - Viewed (0) -
compat/maven-compat/pom.xml
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Sun Jun 29 22:37:39 UTC 2025 - 7.8K bytes - Viewed (0) -
.github/hub_scripts/pr_ci.sh
# # # Simple shell script for launching CI jobs using the @bot-gradle GitHub comment listener. # Uses the [hub](https://hub.github.com/) CLI command to issue API requests to GitHub. # This script must be executed from the branch associated with the PR to issue the command on. # PR_NUMBER=$(hub pr show -f '%I')
Registered: Wed Sep 10 11:36:15 UTC 2025 - Last Modified: Fri Jan 22 15:25:21 UTC 2021 - 1K bytes - Viewed (0) -
okhttp-zstd/src/test/java/okhttp3/zstd/ZstdTestMain.kt
sendRequest("https://www.instagram.com/robots.txt", client) } private fun sendRequest( url: String, client: OkHttpClient, ) { val req = Request.Builder().url(url).build() client.newCall(req).execute().use { println(url) println("""Content-Encoding: ${it.networkResponse?.header("Content-Encoding")}""") println("| ${it.body.string().replace("\n", "\n| ")}") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 20:01:04 UTC 2025 - 1.3K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://google.com/robots.txt") .build(); try (Response response = client.newCall(request).execute()) { assertEquals(200, response.code()); assertEquals(Protocol.HTTP_2, response.protocol()); } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Nov 14 17:38:22 UTC 2020 - 1.4K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
} private void parallelDrainQueue(int threadCount) { ExecutorService executor = Executors.newFixedThreadPool(threadCount); for (int i = 0; i < threadCount; i++) { executor.execute(() -> { try { drainQueue(); } catch (Throwable e) { e.printStackTrace(); } }); } executor.shutdown(); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jul 23 00:58:06 UTC 2025 - 5K bytes - Viewed (0) -
compat/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java
import javax.inject.Inject; import java.io.File; import org.apache.maven.artifact.AbstractArtifactComponentTestCase; import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; import org.apache.maven.session.scope.internal.SessionScope; import org.junit.jupiter.api.Test; import static org.codehaus.plexus.testing.PlexusExtension.getBasedir; import static org.mockito.Mockito.mock;
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 2.1K bytes - Viewed (0)