- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 578 for headersOf (0.07 sec)
-
okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt
val headers1 = peer.takeFrame() assertThat(headers1.type).isEqualTo(Http2.TYPE_HEADERS) val data1 = peer.takeFrame() assertThat(data1.type).isEqualTo(Http2.TYPE_DATA) assertThat(data1.streamId).isEqualTo(3) assertArrayEquals("abcdefghi".toByteArray(), data1.data) assertThat(data1.inFinished).isFalse() val headers2 = peer.takeFrame() assertThat(headers2.type).isEqualTo(Http2.TYPE_HEADERS)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 75.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersRequestTest.kt
val headerBlock = headersOf( ":status", "200 OK", ":version", "HTTP/1.1", "connection", "close", ) val request = Request.Builder().url("http://square.com/").build() val response = readHttp2HeadersList(headerBlock, Protocol.HTTP_2).request(request).build() val headers = response.headers assertThat(headers.size).isEqualTo(1)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketExtensionsTest.kt
import assertk.assertThat import assertk.assertions.isEqualTo import okhttp3.Headers.Companion.headersOf import org.junit.jupiter.api.Test class WebSocketExtensionsTest { @Test fun emptyHeader() { assertThat(parse("")).isEqualTo(WebSocketExtensions()) } @Test fun noExtensionHeader() { assertThat(WebSocketExtensions.parse(headersOf())) .isEqualTo(WebSocketExtensions()) } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.3K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
import assertk.assertThat import assertk.assertions.containsExactly import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import assertk.assertions.isTrue import okhttp3.Dns import okhttp3.Headers.Companion.headersOf import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.testing.PlatformRule import okhttp3.tls.HandshakeCertificates
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/RecordedRequestTest.kt
import java.net.InetAddress import java.net.Socket import okhttp3.Headers import okhttp3.Headers.Companion.headersOf import okhttp3.internal.EMPTY_HEADERS import okio.Buffer import org.junit.jupiter.api.Test import org.junit.jupiter.api.Timeout @Timeout(30) class RecordedRequestTest { private val headers: Headers = EMPTY_HEADERS @Test fun testIPv4() { val socket = FakeSocket(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
server.enqueue( MockResponse( headers = headersOf( "Last-Modified", formatDate(-1, TimeUnit.HOURS)!!, "Expires", formatDate(1, TimeUnit.HOURS)!!, ), body = "ABC.1", ), ) server.enqueue( MockResponse( headers = headersOf( "Last-Modified",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersJvmTest.kt
val expected = Instant.ofEpochMilli(0L) val headers = Headers.Builder() .add("Test-Instant", expected) .build() assertThat(headers["Test-Instant"]).isEqualTo("Thu, 01 Jan 1970 00:00:00 GMT") assertThat(headers.getInstant("Test-Instant")).isEqualTo(expected) } @Test fun setDate() { val expected = Date(1000) val headers = Headers.Builder() .add("testDate", Date(0L))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestTest.kt
val body = "hello".toRequestBody() val headers = headersOf("User-Agent", "RequestTest") val method = "PUT" val request = Request( url = url, headers = headers, method = method, body = body, ) assertThat(request.url).isEqualTo(url) assertThat(request.headers).isEqualTo(headers) assertThat(request.method).isEqualTo(method)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
MockResponse( code = 302, headers = headersOf("Location", "/b"), ), ) server.enqueue(MockResponse()) val request = Request(server.url("/")) val call = client.newCall(request) val response = call.execute() assertThat(response.request.url.encodedPath).isEqualTo("/b") assertThat(response.request.headers).isEqualTo(headersOf()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Headers.kt
replaceWith = ReplaceWith(expression = "headersOf(*namesAndValues)"), level = DeprecationLevel.ERROR, ) fun of(vararg namesAndValues: String): Headers { return headersOf(*namesAndValues) } /** Returns headers for the header names and values in the [Map]. */ @JvmStatic @JvmName("of") fun Map<String, String>.toHeaders(): Headers = commonToHeaders()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.5K bytes - Viewed (0)