- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 15 for HTTP_2 (0.04 seconds)
-
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")
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Nov 08 21:45:04 GMT 2025 - 18.8K bytes - Click Count (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")
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 25.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt
.eventListenerFactory(clientTestRule.wrap(eventRecorder)) .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
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 11.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt
} @Test fun serverTruncatesRequestOnLongPostHttp1() { serverTruncatesRequestOnLongPost(https = false) } @Test fun serverTruncatesRequestOnLongPostHttp2() { enableProtocol(Protocol.HTTP_2) serverTruncatesRequestOnLongPost(https = true) } private fun serverTruncatesRequestOnLongPost(https: Boolean) { server.enqueue( MockResponse .Builder() .body("abc")
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 10.4K bytes - Click Count (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 {Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 29.9K bytes - Click Count (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 {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 10.2K bytes - Click Count (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() {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Oct 07 21:55:03 GMT 2025 - 14.6K bytes - Click Count (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.Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 17.8K bytes - Click Count (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt
private lateinit var dns: Dns private val cacheFs = FakeFileSystem() private val eventRecorder = EventRecorder() private val bootstrapClient = OkHttpClient .Builder() .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1)) .eventListener(eventRecorder.eventListener) .build() @BeforeEach fun setUp() { server.protocols = bootstrapClient.protocols dns = buildLocalhost(bootstrapClient, false)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 11.9K bytes - Click Count (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) {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Aug 02 20:36:00 GMT 2025 - 40.3K bytes - Click Count (0)