- Sort Score
- Result 10 results
- Languages All
Results 461 - 470 of 657 for fun (0.05 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/PerCallSettings.kt
package okhttp3.recipes.kt import java.io.IOException import java.util.concurrent.TimeUnit 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.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
import okio.buffer import okio.fakefilesystem.FakeFileSystem class PostPath { private val client = OkHttpClient() private val fileSystem = FakeFileSystem() val path = "test.json".toPath() fun run() { fileSystem.write(path) { writeUtf8("{}") } val request = Request.Builder() .url("https://httpbin.org/anything") .put(path.asRequestBody(fileSystem, MEDIA_TYPE_JSON))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientTest.kt
*/ @RunWith(AndroidJUnit4::class) class ApacheHttpClientTest { private var httpClient = HttpClients.createDefault() @After fun tearDown() { httpClient.close() } @Test fun get() { val request = HttpGet("https://google.com/robots.txt") httpClient.execute(request).use { response -> assertEquals(200, response.code) // TODO enable ALPN later
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk9Platform.kt
import javax.net.ssl.X509TrustManager import okhttp3.Protocol import okhttp3.internal.SuppressSignatureCheck /** OpenJDK 9+. */ open class Jdk9Platform : Platform() { @SuppressSignatureCheck override fun configureTlsExtensions( sslSocket: SSLSocket, hostname: String?, protocols: List<@JvmSuppressWildcards Protocol>, ) { val sslParameters = sslSocket.sslParameters
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt
sink.writeByte(accumulator.toInt()) } } fun encodedLength(bytes: ByteString): Int { var bitCount = 0L for (i in 0 until bytes.size) { val byteIn = bytes[i] and 0xff bitCount += CODE_BIT_COUNTS[byteIn].toLong() } return ((bitCount + 7) shr 3).toInt() // Round up to an even byte. } fun decode( source: BufferedSource, byteCount: Long,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.3K bytes - Viewed (0) -
okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt
internal class StoriesTestProvider : SimpleProvider() { override fun arguments(): List<Any> = createStories(RAW_DATA) } private val bytesOut = Buffer() private val hpackWriter = Hpack.Writer(out = bytesOut) @ParameterizedTest @ArgumentsSource(StoriesTestProvider::class) fun testRoundTrip(story: Story) { assumeFalse( story === Story.MISSING,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/tasks/UpdateInitPluginTemplateVersionFile.kt
store(versionProperties) } private fun store(properties: Properties) { PropertiesUtils.store( properties, libraryVersionFile.get().asFile, "Generated file, please do not edit - Version values used in build-init templates", Charsets.ISO_8859_1, "\n" ) } private fun findLatest(name: String, notation: String, dest: Properties) {
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Fri Jun 28 08:29:29 UTC 2024 - 5.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt
true, ) private val inflaterSource = InflaterSource(deflatedBytes, inflater) /** Inflates [buffer] in place as described in RFC 7692 section 7.2.2. */ @Throws(IOException::class) fun inflate(buffer: Buffer) { require(deflatedBytes.size == 0L) if (noContextTakeover) { inflater.reset() } deflatedBytes.writeAll(buffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt
class HuffmanTest { @Test fun roundTripForRequestAndResponse() { val s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" for (i in s.indices) { assertRoundTrip(s.substring(0, i).encodeUtf8()) } val random = Random(123456789L) val buf = ByteArray(4096) random.nextBytes(buf) assertRoundTrip(buf.toByteString()) } private fun assertRoundTrip(data: ByteString) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 04 05:32:07 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FallbackTestClientSocketFactory.kt
delegate: SSLSocketFactory, ) : DelegatingSSLSocketFactory(delegate) { override fun configureSocket(sslSocket: SSLSocket): SSLSocket = TlsFallbackScsvDisabledSSLSocket(sslSocket) private class TlsFallbackScsvDisabledSSLSocket( socket: SSLSocket, ) : DelegatingSSLSocket(socket) { override fun setEnabledCipherSuites(suites: Array<String>) { val enabledCipherSuites = mutableListOf<String>()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0)