- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for HTTP_2 (0.03 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
.cache(Cache(fileSystem, "/cache/".toPath(), Long.MAX_VALUE)) .build() @Test fun trailersHttp1() { trailers(Protocol.HTTP_1_1) } @Test fun trailersHttp2() { trailers(Protocol.HTTP_2) } private fun trailers(protocol: Protocol) { enableProtocol(protocol) server.enqueue( MockResponse .Builder() .addHeader("h1", "v1")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 18K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt
.socketFactory(socketFactory) .eventListenerFactory(clientTestRule.wrap(listener)) .build() } @Test fun http2OneBadHostOneGoodNoRetryOnConnectionFailure() { enableProtocol(Protocol.HTTP_2) val request = Request(server1.url("/")) server1.enqueue(refusedStream) server2.enqueue(bodyResponse) dns[server1.hostName] = listOf(ipv6, ipv4) socketFactory[ipv6] = server1.socketAddress
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 11.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt
.build(), ) assertFailsWith<ProtocolException> { call.execute() } } @Test fun trueDuplexClientWritesFirst() { enableProtocol(Protocol.HTTP_2) val body = MockSocketHandler() .receiveRequest("request A\n") .sendResponse("response B\n") .receiveRequest("request C\n") .sendResponse("response D\n")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 24.8K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
} }, ), ).build() val response = client.newCall(request).execute() response.use { assertEquals(Protocol.HTTP_2, response.protocol) assertEquals(200, response.code) // see https://github.com/google/conscrypt/blob/b9463b2f74df42d85c73715a5f19e005dfb7b802/android/src/main/java/org/conscrypt/Platform.java#L613 when {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 14:12:28 UTC 2025 - 29K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
.assertNoMoreLogs() } @Test fun connectFail() { assumeNotWindows() server.useHttps(handshakeCertificates.sslSocketFactory()) server.protocols = Arrays.asList(Protocol.HTTP_2, Protocol.HTTP_1_1) server.enqueue( MockResponse .Builder() .failHandshake() .build(), ) url = server.url("/") try {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt
"ConnectionAcquired", "ConnectionReleased", ) } @Test @Throws(IOException::class) fun secondCallEventSequence() { enableTls() server!!.protocols = listOf(Protocol.HTTP_2, Protocol.HTTP_1_1) server!!.enqueue(MockResponse()) server!!.enqueue(MockResponse()) client .newCall(Request(server!!.url("/"))) .execute() .close() client
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 9.8K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
/** * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this attaches a * pushed stream to this response. */ public fun addPush(promise: PushPromise): Builder = apply { this.pushPromises_ += promise } /** * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this pushes * [settings] before writing the response.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 17.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt
internal fun incrementSuccessCount() { withLock { successCount++ } } @Throws(IOException::class) fun start() { idleAtNs = System.nanoTime() if (protocol == Protocol.HTTP_2 || protocol == Protocol.H2_PRIOR_KNOWLEDGE) { startHttp2() } } @Throws(IOException::class) private fun startHttp2() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 14.9K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
* * This list is ignored when [negotiation is disabled][protocolNegotiationEnabled]. */ public var protocols: List<Protocol> = immutableListOf(Protocol.HTTP_2, Protocol.HTTP_1_1) set(value) { val protocolList = value.toImmutableList() require(Protocol.H2_PRIOR_KNOWLEDGE !in protocolList || protocolList.size == 1) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 20:36:00 UTC 2025 - 40.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt
} } private fun enableHttps() { enableHttpsAndAlpn(Protocol.HTTP_1_1) } private fun enableHttp2() { platform.assumeHttp2Support() enableHttpsAndAlpn(Protocol.HTTP_2, Protocol.HTTP_1_1) } private fun enableHttpsAndAlpn(vararg protocols: Protocol) { client = client .newBuilder() .sslSocketFactory(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 12.2K bytes - Viewed (0)