- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 111 for OkHttpClient (0.2 sec)
-
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
this.fastFallback = okHttpClient.fastFallback this.authenticator = okHttpClient.authenticator this.followRedirects = okHttpClient.followRedirects this.followSslRedirects = okHttpClient.followSslRedirects this.cookieJar = okHttpClient.cookieJar this.cache = okHttpClient.cache this.dns = okHttpClient.dns this.proxy = okHttpClient.proxy this.proxySelector = okHttpClient.proxySelector
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:21:33 GMT 2024 - 52K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OkHttpClientTest.kt
) } } @Test fun testH2PriorKnowledgeOkHttpClientConstructionSuccess() { val okHttpClient = OkHttpClient.Builder() .protocols(listOf(Protocol.H2_PRIOR_KNOWLEDGE)) .build() assertThat(okHttpClient.protocols.size).isEqualTo(1) assertThat(okHttpClient.protocols[0]).isEqualTo(Protocol.H2_PRIOR_KNOWLEDGE) } @Test fun nullDefaultProxySelector() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 13.2K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
builder.eventListenerFactory(LoggingEventListener.Factory(logger)) } return builder.build() } fun close() { val okHttpClient = client as OkHttpClient okHttpClient.connectionPool.evictAll() // Close any persistent connections. okHttpClient.dispatcher.executorService.shutdownNow() } companion object { internal const val NAME = "okcurl" internal const val DEFAULT_TIMEOUT = -1
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.7K bytes - Viewed (1) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.kt
import java.net.UnknownHostException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient /** * Temporary registry of known DNS over HTTPS providers. * * https://github.com/curl/curl/wiki/DNS-over-HTTPS */ object DohProviders { private fun buildGoogle(bootstrapClient: OkHttpClient): DnsOverHttps { return DnsOverHttps.Builder() .client(bootstrapClient)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Dec 23 10:26:25 GMT 2023 - 3.8K bytes - Viewed (3) -
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
import assertk.assertions.isEqualTo import java.net.HttpURLConnection import java.net.Proxy import java.net.URI import javax.net.ssl.HttpsURLConnection import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Request import okhttp3.containers.BasicMockServerTest.Companion.MOCKSERVER_IMAGE import okhttp3.containers.BasicMockServerTest.Companion.trustMockServer import okio.buffer
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 5.9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
* exceptions. * * Use [newClient] as a factory for a OkHttpClient instances. These instances are specifically * configured for testing. */ class OkHttpClientTestRule : BeforeEachCallback, AfterEachCallback { private val clientEventsList = mutableListOf<String>() private var testClient: OkHttpClient? = null private var uncaughtException: Throwable? = null private lateinit var testName: String
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliTestMain.kt
*/ package okhttp3.brotli import okhttp3.OkHttpClient import okhttp3.Request fun main() { val client = OkHttpClient.Builder() .addInterceptor(BrotliInterceptor) .build() sendRequest("https://httpbin.org/brotli", client) sendRequest("https://httpbin.org/gzip", client) } private fun sendRequest( url: String, client: OkHttpClient, ) { val req = Request.Builder().url(url).build()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.1K bytes - Viewed (3) -
okhttp/src/test/java/okhttp3/TestTls13Request.kt
private fun testClient( urls: List<String>, client: OkHttpClient, ) { try { for (url in urls) { sendRequest(client, url) } } finally { client.dispatcher.executorService.shutdownNow() client.connectionPool.evictAll() } } private fun buildClient(vararg specs: ConnectionSpec): OkHttpClient { return OkHttpClient.Builder() .connectionSpecs(listOf(*specs)) .build() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt
*/ package okhttp3.recipes.kt import java.io.File import java.io.IOException import okhttp3.Cache import okhttp3.OkHttpClient import okhttp3.Request class CacheResponse(cacheDirectory: File) { private val client: OkHttpClient = OkHttpClient.Builder() .cache( Cache( directory = cacheDirectory, // 1 MiB. maxSize = 10L * 1024L * 1024L,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2K bytes - Viewed (2) -
okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt
@Config( sdk = [30], ) class RobolectricOkHttpClientTest { private lateinit var context: Context private lateinit var client: OkHttpClient @Before fun setUp() { context = ApplicationProvider.getApplicationContext<Application>() client = OkHttpClient.Builder() .cache(Cache(FakeFileSystem(), "/cache".toPath(), 10_000_000)) .build() } @Test fun testRequestExternal() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 2.5K bytes - Viewed (0)