- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 322 for headersOf (0.06 sec)
-
okhttp/src/test/java/okhttp3/HeadersTest.kt
val headers1 = Headers.Builder() .add("Connection", "close") .add("Transfer-Encoding", "chunked") .build() val headers2 = Headers.Builder() .add("Connection", "keep-alive") .add("Transfer-Encoding", "chunked") .build() assertThat(headers2).isNotEqualTo(headers1) assertThat(headers2.hashCode()).isNotEqualTo(headers1.hashCode().toLong()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt
val headers = headersOf("Cache-Control", "max-age=12", "Pragma", "must-revalidate", "Pragma", "public") val cacheControl = parse(headers) assertThat(cacheControl.toString()).isEqualTo("max-age=12, public, must-revalidate") } @Test fun parseCacheControlHeaderValueIsRetained() { val value = "max-age=12" val headers = headersOf("Cache-Control", value)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
var headers: Headers = mockResponse.headers var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("") mockResponse = mockResponse.addHeader("", "") mockResponse = mockResponse.addHeaderLenient("", Any()) mockResponse = mockResponse.setHeader("", Any()) mockResponse.headers = headersOf()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersKotlinTest.kt
import java.util.Date import okhttp3.Headers.Companion.headersOf import org.junit.jupiter.api.Test class HeadersKotlinTest { @Test fun getOperator() { val headers = headersOf("a", "b", "c", "d") assertThat(headers["a"]).isEqualTo("b") assertThat(headers["c"]).isEqualTo("d") assertThat(headers["e"]).isNull() } @Test fun iteratorOperator() { val headers = headersOf("a", "b", "c", "d")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Dec 21 01:54:49 UTC 2023 - 2K 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)