- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 162 for okHttpClient (0.06 sec)
-
container-tests/src/test/java/okhttp3/containers/BasicLoomTest.kt
val capturedOut = ByteArrayOutputStream() private lateinit var executor: ExecutorService private lateinit var client: OkHttpClient @BeforeEach fun setUp() { platform.assumeLoom() assertThat(System.getProperty("jdk.tracePinnedThreads")).isNotEmpty() client = OkHttpClient .Builder() .trustMockServer() .dispatcher(Dispatcher(newVirtualThreadPerTaskExecutor()))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.7K bytes - Viewed (1) -
samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java
import javax.net.ssl.X509TrustManager; import okhttp3.CipherSuite; import okhttp3.ConnectionSpec; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import static java.util.Arrays.asList; public final class CustomCipherSuites { private final OkHttpClient client; public CustomCipherSuites() throws GeneralSecurityException {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Mar 14 21:57:42 UTC 2019 - 6.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java
* limitations under the License. */ package okhttp3.recipes; import java.io.IOException; import java.security.cert.X509Certificate; import okhttp3.Headers; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.tls.Certificates; import okhttp3.tls.HandshakeCertificates; public final class CustomTrust {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 9.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt
* * * The resulting file is used by [PublicSuffixDatabase]. */ class PublicSuffixListGenerator( projectRoot: Path = ".".toPath(), val fileSystem: FileSystem = FileSystem.SYSTEM, val client: OkHttpClient = OkHttpClient(), ) { private val testResources = projectRoot / "okhttp/src/jvmTest/resources" private val publicSuffixListDotDat = testResources / "okhttp3/internal/publicsuffix/public_suffix_list.dat"
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Aug 06 05:33:11 UTC 2025 - 6.1K 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 14:55:54 UTC 2022 - 50.8K bytes - Viewed (0) -
docs/features/interceptors.md
Register an _application_ interceptor by calling `addInterceptor()` on `OkHttpClient.Builder`: ```java OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new LoggingInterceptor()) .build(); Request request = new Request.Builder() .url("http://www.publicobject.com/helloworld.txt")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 8.1K bytes - Viewed (0) -
okhttp-logging-interceptor/README.md
=================== An [OkHttp interceptor][interceptors] which logs HTTP request and response data. ```java HttpLoggingInterceptor logging = new HttpLoggingInterceptor(); logging.setLevel(Level.BASIC); OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(logging) .build(); ``` You can change the log level at any time by calling `setLevel()`. To log to a custom location, pass a `Logger` instance to the constructor.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AccessHeaders.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import okhttp3.OkHttpClient import okhttp3.Request class AccessHeaders { private val client = OkHttpClient() fun run() { val request = Request .Builder() .url("https://api.github.com/repos/square/okhttp/issues")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.4K bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt
import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.internal.platform.AndroidPlatform import okio.IOException open class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val client = OkHttpClient() // Ensure we are compiling against the right variant
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Aug 19 08:10:39 UTC 2025 - 1.7K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt
import java.util.concurrent.CountDownLatch import okhttp3.Call import okhttp3.Callback import okhttp3.Dns import okhttp3.HttpUrl import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.Response import okhttp3.internal.platform.Platform
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 8.6K bytes - Viewed (0)