- Sort Score
- Result 10 results
- Languages All
Results 181 - 190 of 508 for eval (1.29 sec)
-
android-test/src/test/kotlin/okhttp/android/test/AndroidSocketAdapterTest.kt
class AndroidSocketAdapterTest( val adapter: SocketAdapter, ) { val context: SSLContext by lazy { val provider: Provider = Conscrypt.newProviderBuilder().provideTrustManager(true).build() SSLContext.getInstance("TLS", provider).apply { init(null, null, null) } } @Test fun testMatchesSupportedSocket() { val socketFactory = context.socketFactory
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConscryptTest.kt
import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.RegisterExtension class ConscryptTest { @JvmField @RegisterExtension val platform = PlatformRule() @JvmField @RegisterExtension val clientTestRule = OkHttpClientTestRule() private val client = clientTestRule.newClient() @BeforeEach fun setUp() { platform.assumeConscrypt() } @Test fun testTrustManager() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/StatusLine.kt
import okhttp3.Protocol import okhttp3.Response import okio.IOException /** An HTTP response status line like "HTTP/1.1 200 OK". */ class StatusLine( @JvmField val protocol: Protocol, @JvmField val code: Int, @JvmField val message: String, ) { override fun toString(): String = buildString { if (protocol == Protocol.HTTP_1_0) { append("HTTP/1.0") } else {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
import okhttp3.internal.toLongOrDefault import okio.Buffer import okio.BufferedSource import okio.ByteString.Companion.encodeUtf8 import okio.Options internal class ServerSentEventReader( private val source: BufferedSource, private val callback: Callback, ) { private var lastId: String? = null interface Callback { fun onEvent( id: String?, type: String?, data: String, )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 4.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/RealWebSocketTest.kt
private class TestStreams( private val taskFaker: TaskFaker, private val delegate: Socket, private val client: Boolean, ) : BufferedSocket { private val name = if (client) "client" else "server" val listener = WebSocketRecorder(name) var webSocket: RealWebSocket? = null var sourceClosed = false var sinkClosed = false val closed: Boolean get() = sourceClosed && sinkClosed
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 18.7K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt
if (matchesSocket(sslSocket)) { val bcSocket = sslSocket as BCSSLSocket val sslParameters = bcSocket.parameters // Enable ALPN. sslParameters.applicationProtocols = Platform.alpnProtocolNames(protocols).toTypedArray() bcSocket.parameters = sslParameters } } companion object { val factory = object : DeferredSocketAdapter.Factory {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.3K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/AndroidLoggingTest.kt
@RunWith(RobolectricTestRunner::class) class AndroidLoggingTest { val clientBuilder = OkHttpClient.Builder().connectionSpecs(listOf(ConnectionSpec.CLEARTEXT)).dns { throw UnknownHostException("shortcircuit") } val request = Request("http://google.com/robots.txt".toHttpUrl()) @Test fun testHttpLoggingInterceptor() { val interceptor = HttpLoggingInterceptor().apply {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 3.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt
import okhttp3.RequestBody.Companion.toRequestBody class PostString { private val client = OkHttpClient() fun run() { val postBody = """ |Releases |-------- | | * _1.0_ May 6, 2013 | * _1.1_ June 15, 2013 | * _1.2_ August 11, 2013 | """.trimMargin() val request = Request( url = "https://api.github.com/markdown/raw".toHttpUrl(),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt
override fun platformTrustManager(): X509TrustManager { val factory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm(), provider, ) factory.init(null as KeyStore?) val trustManagers = factory.trustManagers!! check(trustManagers.size == 1 && trustManagers[0] is X509TrustManager) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PerCallSettings.kt
import okhttp3.OkHttpClient import okhttp3.Request class PerCallSettings { private val client = OkHttpClient() fun run() { val request = 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. val client1 = client .newBuilder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.7K bytes - Viewed (0)