- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 122 for run (0.01 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
import okio.buffer import okio.fakefilesystem.FakeFileSystem class PostPath { private val client = OkHttpClient() private val fileSystem = FakeFileSystem() val path = "test.json".toPath() fun run() { fileSystem.write(path) { writeUtf8("{}") } val request = Request.Builder() .url("https://httpbin.org/anything") .put(path.asRequestBody(fileSystem, MEDIA_TYPE_JSON))
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/CurrentDateHeader.java
import okhttp3.Response; public final class CurrentDateHeader { private final OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new CurrentDateInterceptor()) .build(); public void run() throws Exception { Request request = new Request.Builder() .url("https://publicobject.com/helloworld.txt") .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Oct 31 15:32:50 UTC 2018 - 1.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostString.java
public final class PostString { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { String postBody = "" + "Releases\n" + "--------\n" + "\n" + " * _1.0_ May 6, 2013\n" + " * _1.1_ June 15, 2013\n" + " * _1.2_ August 11, 2013\n";
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Authenticate.java
return response.request().newBuilder() .header("Authorization", credential) .build(); }) .build(); } public void run() throws Exception { Request request = new Request.Builder() .url("http://publicobject.com/secrets/hellosecret.txt") .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
import okhttp3.tls.HandshakeCertificates; import okhttp3.tls.HeldCertificate; /** * Create an HTTPS server with a self-signed certificate that OkHttp trusts. */ public class HttpsServer { public void run() throws Exception { HeldCertificate localhostCertificate = new HeldCertificate.Builder() .addSubjectAlternativeName("localhost") .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PerCallSettings.java
import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class PerCallSettings { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder() .url("http://httpbin.org/delay/1") // This URL is served with a 1 second delay. .build(); // Copy to customize OkHttp for this request.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.9K bytes - Viewed (0) -
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()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Nov 05 07:46:46 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt
} finally { if (loggingEnabled) { val elapsedNs = queue.taskRunner.backend.nanoTime() - startNs if (completedNormally) { log(task, queue, "finished run in ${formatDuration(elapsedNs)}") } else { log(task, queue, "failed a run in ${formatDuration(elapsedNs)}") } } } } private fun Logger.log( task: Task, queue: TaskQueue, message: String, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0) -
deploy_website.sh
#!/bin/bash # The website is built using MkDocs with the Material theme. # https://squidfunk.github.io/mkdocs-material/ # It requires python3 to run. set -ex REPO="******@****.***:square/okhttp.git" DIR=temp-clone # Delete any existing temporary website clone rm -rf $DIR # Clone the current repo into temp folder git clone $REPO $DIR # Replace `git clone` with these lines to hack on the website locally
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Nov 20 15:26:12 UTC 2023 - 1.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt
* an existing external tool is required. * * See https://stackoverflow.com/questions/61929216/how-to-log-tlsv1-3-keys-in-jsse-for-wireshark-to-decode-traffic * * Steps to run in your own code * * 1. In your main method `WireSharkListenerFactory.register()` * 2. Create Listener factory `val eventListenerFactory = WireSharkListenerFactory(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0)