- Sort Score
- Result 10 results
- Languages All
Results 301 - 310 of 881 for val2 (0.05 sec)
-
internal/cachevalue/cache.go
} func (t *Cache[T]) update(ctx context.Context) error { val, err := t.updateFn(ctx) if err != nil { if t.opts.ReturnLastGood && t.val.Load() != nil { // Keep last good value, so update // does not return an error. return nil } return err } t.val.Store(&val) t.lastUpdateMs.Store(time.Now().UnixMilli()) return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 12:50:46 UTC 2024 - 4.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
class DevServer { val handshakeCertificates = TlsUtil.localhost() val server = MockWebServer().apply { useHttps(handshakeCertificates.sslSocketFactory(), false) enqueue( MockResponse() .setResponseCode(HTTP_MOVED_TEMP) .setHeader("Location", "https://www.google.com/robots.txt"), ) } val clientCertificates =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt
import java.io.IOException import okhttp3.OkHttpClient import okhttp3.Request class ParseResponseWithMoshi { private val client = OkHttpClient() private val moshi = Moshi.Builder().build() private val gistJsonAdapter = moshi.adapter(Gist::class.java) fun run() { val request = Request.Builder() .url("https://api.github.com/gists/c2a7c39532239ff261be") .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt
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) { val encodeBuffer = Buffer()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 04 05:32:07 UTC 2024 - 1.8K bytes - Viewed (0) -
.teamcity/src/main/kotlin/common/Jvm.kt
*/ package common interface Jvm { val version: JvmVersion val vendor: JvmVendor } data class DefaultJvm( override val version: JvmVersion, override val vendor: JvmVendor ) : Jvm object BuildToolBuildJvm : Jvm { override val version: JvmVersion get() = JvmVersion.java17 override val vendor: JvmVendor get() = JvmVendor.openjdk }
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Tue Oct 15 09:53:08 UTC 2024 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
-----END CERTIFICATE----- """.trimIndent().decodeCertificatePem() private val client: OkHttpClient init { // This implementation just embeds the PEM files in Java strings; most applications will // instead read this from a resource file that gets bundled with the application. val certificates = HandshakeCertificates.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.8K bytes - Viewed (0) -
native-image-tests/src/test/kotlin/okhttp3/nativeImage/NativeImageTestsTest.kt
class NativeImageTestsTest { @Test fun testFindsFixedTestsForImage() { val testSelector = testSelectors() val x = findTests(testSelector) x.find { it is ClassBasedTestDescriptor && it.testClass == SampleTest::class.java } } @Test fun testFindsModuleTests() { val testSelector = DiscoverySelectors.selectPackage("okhttp3") val x = findTests(listOf(testSelector))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
build-logic/cleanup/src/main/kotlin/gradlebuild/testing/services/BuildBucketProvider.kt
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Fri Jun 28 08:29:28 UTC 2024 - 4.9K bytes - Viewed (0) -
samples/tlssurvey/src/main/kotlin/okhttp3/survey/types/Client.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Apr 02 01:44:15 UTC 2024 - 883 bytes - Viewed (0) -
docs/recipes.md
```kotlin private val executor = Executors.newScheduledThreadPool(1) private val client = OkHttpClient() fun run() { val request = Request.Builder() .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay. .build() val startNanos = System.nanoTime() val call = client.newCall(request)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0)