- Sort Score
- Result 10 results
- Languages All
Results 1721 - 1730 of 1,950 for func (0.06 sec)
-
okhttp/src/test/java/okhttp3/internal/platform/android/AndroidSocketAdapterTest.kt
@BeforeEach fun setUp() { platform.assumeConscrypt() } val context: SSLContext by lazy { val provider: Provider = Conscrypt.newProviderBuilder().provideTrustManager(true).build() SSLContext.getInstance("TLS", provider).apply { init(null, null, null) } } @ParameterizedTest @MethodSource("data") fun testMatchesSupportedSocket(adapter: SocketAdapter) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt
* https://tersesystems.com/blog/2018/09/08/keymanagers-and-keystores/ * * Install OpenSC separately. On a mac `brew cast install opensc`. */ @SuppressSignatureCheck class YubikeyClientAuth { fun run() { // The typical PKCS11 slot, may vary with different hardware. val slot = 0 val config = "--name=OpenSC\nlibrary=/Library/OpenSC/lib/opensc-pkcs11.so\nslot=$slot\n"
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
docs/recipes.md
private val client = OkHttpClient() fun run() { val request = Request.Builder() .url("http://publicobject.com/helloworld.txt") .build() client.newCall(request).enqueue(object : Callback { override fun onFailure(call: Call, e: IOException) { e.printStackTrace() } override fun onResponse(call: Call, response: Response) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/NativeImageTestsAccessors.kt
import okhttp3.Response import okhttp3.internal.connection.Exchange import okhttp3.internal.connection.RealCall import okhttp3.internal.connection.RealConnection import okio.FileSystem import okio.Path internal fun buildCache( file: Path, maxSize: Long, fileSystem: FileSystem, ): Cache { return Cache(fileSystem, file, maxSize) } internal var RealConnection.idleAtNsAccessor: Long get() = idleAtNs
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostFile.kt
import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody class PostFile { private val client = OkHttpClient() fun run() { val file = File("README.md") val request = Request( url = "https://api.github.com/markdown/raw".toHttpUrl(), body = file.asRequestBody(MEDIA_TYPE_MARKDOWN), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
native-image-tests/src/main/kotlin/okhttp3/PublicSuffixDatabaseTest.kt
class PublicSuffixDatabaseTest { @RegisterExtension @JvmField val platform = PlatformRule() @Test fun testResourcesLoaded() { val url = "https://api.twitter.com".toHttpUrl() assertThat(url.topPrivateDomain()).isEqualTo("twitter.com") } @Test fun testPublicSuffixes() { platform.assumeNotGraalVMImage()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 24 09:33:12 UTC 2023 - 1.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt
private lateinit var clientRootCa: HeldCertificate private lateinit var clientIntermediateCa: HeldCertificate private lateinit var clientCert: HeldCertificate @BeforeEach fun setUp(server: MockWebServer) { this.server = server platform.assumeNotOpenJSSE() platform.assumeNotBouncyCastle() serverRootCa = HeldCertificate.Builder() .serialNumber(1L)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 12.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt
) } fun newRoute( address: Address = newAddress(), proxy: Proxy = this.proxy, socketAddress: InetSocketAddress = InetSocketAddress.createUnresolved(uriHost, uriPort), ): Route { return Route( address = address, proxy = proxy, socketAddress = socketAddress, ) } fun newChain(call: RealCall): RealInterceptorChain {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 7.7K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
val clientTestRule = OkHttpClientTestRule() @RegisterExtension val platform = PlatformRule() private lateinit var server: MockWebServer @BeforeEach fun setUp(server: MockWebServer) { this.server = server } @Test fun clientSendsServerNameAndServerReceivesIt() { // java.net.ConnectException: Connection refused platform.assumeNotConscrypt() val handshakeCertificates = localhost()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
okhttp-testing-support/src/test/kotlin/okhttp3/OkHttpClientTestRuleTest.kt
BeforeEachCallback { context -> ******@****.***ionContext = context } @Test fun uncaughtException() { val testRule = OkHttpClientTestRule() testRule.beforeEach(extensionContext) val thread = object : Thread() { override fun run() { throw RuntimeException("boom!") } } thread.start() thread.join()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0)