- Sort Score
- Result 10 results
- Languages All
Results 921 - 930 of 1,942 for client (0.1 sec)
-
samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt
@Test fun get(server: MockWebServer) { server.enqueue(MockResponse(body = "hello, OkHttp")) val client = OkHttpClient() val request = Request.Builder() .url(server.url("/")) .header("Accept", "text/plain") .build() val response = client.newCall(request).execute() assertThat(response.code).isEqualTo(200) assertThat(response.body.string()).isEqualTo("hello, OkHttp")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java
import okhttp3.Response; import okhttp3.ResponseBody; public final class AsynchronousGet { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder() .url("http://publicobject.com/helloworld.txt") .build(); client.newCall(request).enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) {
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/ParseResponseWithMoshi.java
import java.io.IOException; import java.util.Map; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class ParseResponseWithMoshi { private final OkHttpClient client = new OkHttpClient(); private final Moshi moshi = new Moshi.Builder().build(); private final JsonAdapter<Gist> gistJsonAdapter = moshi.adapter(Gist.class); public void run() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.8K bytes - Viewed (0) -
okhttp-brotli/README.md
provided Accept-Encoding is not set previously. Modern web servers must choose to return Brotli responses. n.b. It is not used for sending requests. ```java OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(BrotliInterceptor.INSTANCE) .build(); ``` ```kotlin implementation("com.squareup.okhttp3:okhttp-brotli:4.12.0") ```
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 572 bytes - Viewed (0) -
helm/minio/templates/networkpolicy.yaml
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jan 24 07:27:57 UTC 2024 - 819 bytes - Viewed (0) -
okhttp-coroutines/README.md
OkHttp Coroutines ================= Support for Kotlin clients using coroutines. ```kotlin val call = client.newCall(request) call.executeAsync().use { response -> withContext(Dispatchers.IO) { println(response.body?.string()) } } ``` This is implemented using `suspendCancellableCoroutine` but uses the standard Dispatcher in OkHttp. This means that by default Kotlin's Dispatchers are not used.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Nov 09 15:47:27 UTC 2023 - 609 bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/SmbComSessionSetupAndX.java
class SmbComSessionSetupAndX extends AndXServerMessageBlock { private static final int BATCH_LIMIT = Config.getInt( "jcifs.smb1.smb.client.SessionSetupAndX.TreeConnectAndX", 1 ); private static final boolean DISABLE_PLAIN_TEXT_PASSWORDS = Config.getBoolean( "jcifs.smb1.smb.client.disablePlainTextPasswords", true ); private byte[] lmHash, ntHash, blob = null; private int sessionKey, capabilities;
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 7.3K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
server.start(); OkHttpClient client = new OkHttpClient.Builder() .socketFactory(new UnixDomainSocketFactory(socketFile)) .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE)) .build(); Request request = new Request.Builder() .url("http://publicobject.com/helloworld.txt") .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Dec 24 03:46:30 UTC 2018 - 2.1K bytes - Viewed (0) -
cni/pkg/plugin/plugin_dryrun_test.go
conf, err := parseConfig(args.StdinData) if err != nil { t.Fatalf("config parse failed with error: %v", err) } // Create a kube client client := kube.NewFakeClient(objects...) err = doAddRun(args, conf, client.Kube(), IptablesInterceptRuleMgr()) if err != nil { t.Fatalf("failed with error: %v", err) } } func buildFakeDryRunPod() *corev1.Pod {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Aug 27 16:44:45 UTC 2024 - 8.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocketChannelTest.kt
// https://tools.ietf.org/html/rfc6066#page-6 specifies a FQDN is required. val hostname = "local.host" private val handshakeCertificates = run { // Generate a self-signed cert for the server to serve and the client to trust. val heldCertificate = HeldCertificate.Builder() .commonName(hostname) .addSubjectAlternativeName(hostname) .build() HandshakeCertificates.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8K bytes - Viewed (0)