- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 101 for void (0.12 sec)
-
samples/guide/src/main/java/okhttp3/guide/PostExample.java
+ "{'name':'" + player1 + "','history':[10,8,6,7,8],'color':-13388315,'total':39}," + "{'name':'" + player2 + "','history':[6,10,5,10,10],'color':-48060,'total':41}" + "]}"; } public static void main(String[] args) throws IOException { PostExample example = new PostExample(); String json = example.bowlingJson("Jesse", "Jake"); String response = example.post("http://www.roundsapp.com/post", json);
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ResponseBody.kt
* * ```java * Call call = client.newCall(request); * call.enqueue(new Callback() { * 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. * } * }); * ``` *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.7K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
private final ConcurrentHashMap<String, AtomicInteger> hostnames = new ConcurrentHashMap<>(); public Crawler(OkHttpClient client) { this.client = client; } private void parallelDrainQueue(int threadCount) { ExecutorService executor = Executors.newFixedThreadPool(threadCount); for (int i = 0; i < threadCount; i++) { executor.execute(() -> { try { drainQueue();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 4.6K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt
results.add(task) task.run() } /** Returns a task that processes both request and response from [stream]. */ private fun serviceStreamTask(stream: Stream): FutureTask<Void> { return FutureTask<Void> { stream.requestBody.use { stream.responseBody.use { while (true) { val action = actions.poll() ?: break action(stream) } }
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) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt
val returnType = method.returnType if (methodName == "supports" && Boolean::class.javaPrimitiveType == returnType) { return true // ALPN is supported. } else if (methodName == "unsupported" && Void.TYPE == returnType) { this.unsupported = true // Peer doesn't support ALPN. return null } else if (methodName == "protocols" && callArgs.isEmpty()) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
.setResponseCode(302) .addHeader("Location", "https://twitter.com/CuteEmergency/status/789457462864863232"); } public interface Listener { void sessionGranted(OAuthSession session); } @Override public void close() { if (mockWebServer == null) throw new IllegalStateException(); try { mockWebServer.close(); } catch (IOException ignored) { } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 3.8K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/TunnelingUnixSocket.java
this(path, channel); this.inetSocketAddress = address; } @Override public void connect(SocketAddress endpoint) throws IOException { this.inetSocketAddress = (InetSocketAddress) endpoint; super.connect(new UnixSocketAddress(path), 0); } @Override public void connect(SocketAddress endpoint, int timeout) throws IOException { this.inetSocketAddress = (InetSocketAddress) endpoint;
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Feb 12 16:33:52 GMT 2019 - 1.9K bytes - Viewed (1) -
samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java
public PreemptiveAuth() { client = new OkHttpClient.Builder() .addInterceptor( new BasicAuthInterceptor("publicobject.com", "jesse", "password1")) .build(); } public void run() throws Exception { Request request = new Request.Builder() .url("https://publicobject.com/secrets/hellosecret.txt") .build(); try (Response response = client.newCall(request).execute()) {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Nov 05 07:46:46 GMT 2018 - 2.1K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java
* * Read https://community.letsencrypt.org/t/mobile-client-workarounds-for-isrg-issue/137807 * for background. */ @RunWith(AndroidJUnit4.class) public class LetsEncryptTest { @Test public void getFailsWithoutAdditionalCert() throws IOException { OkHttpClient client = new OkHttpClient(); boolean androidMorEarlier = Build.VERSION.SDK_INT <= 23; try {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Nov 17 07:40:31 GMT 2020 - 6.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java
int cacheSize = 10 * 1024 * 1024; // 10 MiB Cache cache = new Cache(cacheDirectory, cacheSize); client = new OkHttpClient.Builder() .cache(cache) .build(); } public void run() throws Exception { Request request = new Request.Builder() .url("http://publicobject.com/helloworld.txt") .build(); String response1Body;
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 2.4K bytes - Viewed (0)