- Sort Score
- Result 10 results
- Languages All
Results 331 - 340 of 527 for Fun (0.01 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/BufferMockResponseBody.kt
import okio.Buffer import okio.BufferedSink internal fun Buffer.toMockResponseBody(): MockResponseBody { val defensiveCopy = clone() return BufferMockResponseBody(defensiveCopy) } internal class BufferMockResponseBody( val buffer: Buffer, ) : MockResponseBody { override val contentLength = buffer.size override fun writeTo(sink: BufferedSink) { buffer.copyTo(sink.buffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 07 16:05:34 UTC 2024 - 1.1K bytes - Viewed (0) -
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-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/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/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) -
samples/guide/src/main/java/okhttp3/recipes/kt/ConfigureTimeouts.kt
.callTimeout(10, TimeUnit.SECONDS) .build() fun run() { val request = Request.Builder() .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay. .build() client.newCall(request).execute().use { response -> println("Response completed: $response") } } } fun main() { ConfigureTimeouts().run()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K 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) -
okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt
import okhttp3.internal.trimSubstring /** A cookie jar that delegates to a [java.net.CookieHandler]. */ class JavaNetCookieJar(private val cookieHandler: CookieHandler) : CookieJar { override fun saveFromResponse( url: HttpUrl, cookies: List<Cookie>, ) { val cookieStrings = mutableListOf<String>() for (cookie in cookies) { cookieStrings.add(cookieToString(cookie, true)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:10:43 UTC 2024 - 3.8K bytes - Viewed (0) -
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
import okhttp3.RequestBody import okio.Buffer class MainTest { @Test fun simple() { val request = fromArgs("http://example.com").createRequest() assertThat(request.method).isEqualTo("GET") assertThat(request.url.toString()).isEqualTo("http://example.com/") assertThat(request.body).isNull() } @Test @Throws(IOException::class) fun put() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
var clientTestRule = OkHttpClientTestRule() private lateinit var server: MockWebServer @BeforeEach fun setup(server: MockWebServer) { this.server = server platform.assumeNotBouncyCastle() } /** * The pinner should pull the root certificate from the trust manager. */ @Test fun pinRootNotPresentInChain() { // Fails on 11.0.1 https://github.com/square/okhttp/issues/4703 val rootCa =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.8K bytes - Viewed (0)