- Sort Score
- Result 10 results
- Languages All
Results 361 - 370 of 657 for fun (0.04 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
.toDouble(), ) .isCloseTo(elapsedMs.toDouble(), 100.0) } return result } fun recordedEventTypes() = eventSequence.map { it.name } fun clearAllEvents() { while (eventSequence.isNotEmpty()) { takeEvent() } } private fun logEvent(e: ConnectionEvent) { if (e.connection != null) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RecordingCallback.kt
private val responses = mutableListOf<RecordedResponse>() @Synchronized override fun onFailure( call: Call, e: IOException, ) { responses.add(RecordedResponse(call.request(), null, null, null, e)) (this as Object).notifyAll() } @Synchronized override fun onResponse( call: Call, response: Response, ) { val body = response.body.string()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JettyHttpClientTest.kt
*/ class JettyHttpClientTest { private val client = HttpClient() @BeforeEach fun setUp() { client.start() } @AfterEach fun tearDown() { client.stop() } @Test fun get(server: MockWebServer) { server.enqueue(MockResponse(body = "hello, Jetty HTTP Client")) val request = client.newRequest(server.url("/").toUri())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocketFactory.kt
open class DelegatingSSLSocketFactory(private val delegate: SSLSocketFactory) : SSLSocketFactory() { @Throws(IOException::class) override fun createSocket(): SSLSocket { val sslSocket = delegate.createSocket() as SSLSocket return configureSocket(sslSocket) } @Throws(IOException::class) override fun createSocket( host: String, port: Int, ): SSLSocket { val sslSocket = delegate.createSocket(host, port) as SSLSocket
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Handshake.kt
level = DeprecationLevel.ERROR, ) fun localPrincipal(): Principal? = localPrincipal override fun equals(other: Any?): Boolean { return other is Handshake && other.tlsVersion == tlsVersion && other.cipherSuite == cipherSuite && other.peerCertificates == peerCertificates && other.localCertificates == localCertificates } override fun hashCode(): Int { var result = 17
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
import org.junit.jupiter.api.io.TempDir class RequestBodyTest { private lateinit var filePath: okio.Path @BeforeEach fun setup( @TempDir tempDir: Path, ) { filePath = tempDir.toOkioPath() / "file.txt" } @Test fun testFileDescriptor() { assertOnFileDescriptor { fd -> val requestBody = fd.toRequestBody() assertThat(requestBody.contentLength()).isEqualTo(-1L)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
* https://github.com/square/okhttp/issues/8078 */ @Test fun `inflate returns finished before bytesRead reaches input length`() { val inflater = MessageInflater(false) val message = "53621260020000".decodeHex() assertThat(inflater.inflate(message)).isEqualTo("22021002".decodeHex()) } @Test fun `deflate golden value`() { val deflater = MessageDeflater(false)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 06 05:31:00 UTC 2024 - 5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt
/** * Tests for ALPN overriding on Android. */ @Tag("Remote") class AlpnOverrideTest { class CustomSSLSocketFactory( delegate: SSLSocketFactory, ) : DelegatingSSLSocketFactory(delegate) { override fun configureSocket(sslSocket: SSLSocket): SSLSocket { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { val parameters = sslSocket.sslParameters
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/Certificates.kt
* * [rfc_7468]: https://tools.ietf.org/html/rfc7468 */ fun X509Certificate.certificatePem(): String { return buildString { append("-----BEGIN CERTIFICATE-----\n") encodeBase64Lines(encoded.toByteString()) append("-----END CERTIFICATE-----\n") } } internal fun StringBuilder.encodeBase64Lines(data: ByteString) { val base64 = data.base64()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/HttpUrl.kt
*/ fun newBuilder(link: String): Builder? { return try { Builder().parse(this, link) } catch (_: IllegalArgumentException) { null } } override fun equals(other: Any?): Boolean { return other is HttpUrl && other.url == url } override fun hashCode(): Int = url.hashCode() override fun toString(): String = url /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 09 12:33:05 UTC 2024 - 63.5K bytes - Viewed (0)