- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 155 for OkHttpClient (0.13 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
import java.io.IOException import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody import okio.Path.Companion.toPath import okio.buffer import okio.fakefilesystem.FakeFileSystem class PostPath { private val client = OkHttpClient() private val fileSystem = FakeFileSystem() val path = "test.json".toPath() fun run() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
} finally { cache.delete() } } private fun OkHttpClient.get(url: String) { val request = Request.Builder().url(url).build() val response = this.newCall(request).execute() response.use { assertEquals(200, response.code) } } fun buildCloudflareIp(bootstrapClient: OkHttpClient): DnsOverHttps { return DnsOverHttps.Builder().client(bootstrapClient)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt
import java.io.IOException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody import okio.BufferedSink class PostStreaming { private val client = OkHttpClient() fun run() { val requestBody = object : RequestBody() { override fun contentType() = MEDIA_TYPE_MARKDOWN
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Call.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 3.6K bytes - Viewed (0) -
docs/changelogs/changelog_3x.md
The best practice in OkHttp 3 is to create a single OkHttpClient instance and share it throughout the application. Requests that needs a customized client should call `OkHttpClient.newBuilder()` on that shared instance. This allows customization without the drawbacks of separate connection pools. * **OkHttpClient is now stateless.** In the 2.x API `OkHttpClient` had getters
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 14:55:54 UTC 2022 - 50.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import java.security.cert.X509Certificate import okhttp3.OkHttpClient import okhttp3.Request.Builder import okhttp3.tls.HandshakeCertificates import okhttp3.tls.decodeCertificatePem class CustomTrust {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java
package okhttp3.recipes; import java.io.IOException; import java.security.cert.Certificate; import okhttp3.CertificatePinner; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class CertificatePinning { private final OkHttpClient client = new OkHttpClient.Builder() .certificatePinner( new CertificatePinner.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 08 21:30:01 UTC 2019 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
* limitations under the License. */ package okhttp3.recipes; import java.io.IOException; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class AccessHeaders { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java
import java.io.IOException; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Headers; import okhttp3.OkHttpClient; import okhttp3.Request; 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()
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 com.squareup.moshi.JsonAdapter; import com.squareup.moshi.Moshi; 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);
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.8K bytes - Viewed (0)