- Sort Score
- Result 10 results
- Languages All
Results 1771 - 1780 of 1,950 for func (0.04 sec)
-
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/test/java/okhttp3/WebPlatformToAsciiTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RouteDatabase.kt
/** Records a failure connecting to [failedRoute]. */ @Synchronized fun failed(failedRoute: Route) { _failedRoutes.add(failedRoute) } /** Records success connecting to [route]. */ @Synchronized fun connected(route: Route) { _failedRoutes.remove(route) } /** Returns true if [route] has failed recently and should be avoided. */ @Synchronized fun shouldPostpone(route: Route): Boolean = route in _failedRoutes
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/tls/BasicTrustRootIndex.kt
return@firstOrNull true } catch (_: Exception) { return@firstOrNull false } } } override fun equals(other: Any?): Boolean { return other === this || (other is BasicTrustRootIndex && other.subjectToCaCerts == subjectToCaCerts) } override fun hashCode(): Int { return subjectToCaCerts.hashCode() }
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/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) -
mockwebserver-junit4/src/main/kotlin/mockwebserver3/junit4/MockWebServerRule.kt
* ``` */ @ExperimentalOkHttpApi class MockWebServerRule : ExternalResource() { val server: MockWebServer = MockWebServer() override fun before() { try { server.start() } catch (e: IOException) { throw RuntimeException(e) } } override fun after() { try { server.shutdown() } catch (e: IOException) { logger.log(Level.WARNING, "MockWebServer shutdown failed", e)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 1.8K bytes - Viewed (0) -
.teamcity/src/test/kotlin/PerformanceTestBuildTypeTest.kt
branch = VersionedSettingsBranch("master"), buildScanTags = listOf("Check"), subprojects = JsonBasedGradleSubprojectProvider(File("../.teamcity/subprojects.json")) ) @Test fun `create correct PerformanceTest build type for Linux`() { val performanceTest = PerformanceTest( buildModel, Stage( StageName.PULL_REQUEST_FEEDBACK,
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Mon Sep 30 07:24:00 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
import okio.buffer /** This is the last interceptor in the chain. It makes a network call to the server. */ class CallServerInterceptor(private val forWebSocket: Boolean) : Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { val realChain = chain as RealInterceptorChain val exchange = realChain.exchange!! val request = realChain.request val requestBody = request.body
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.3K bytes - Viewed (0) -
build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/SortAcceptedApiChangesTaskIntegrationTest.kt
import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test class SortAcceptedApiChangesTaskIntegrationTest : AbstractAcceptedApiChangesMaintenanceTaskIntegrationTest() { @Test fun `verify misordered changes can be sorted`() { //language=JSON firstAcceptedApiChangesFile.writeText( """ { "acceptedApiChanges": [ {
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Tue Jun 04 14:00:46 UTC 2024 - 9.7K bytes - Viewed (0)