- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 505 for headersOf (0.19 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/URLConnectionTest.kt
assertThat(page2.headers["Content-Length"]).isNull() assertThat(page2.headers["Content-Type"]).isNull() assertThat(page2.headers["Transfer-Encoding"]).isNull() } @Test fun response305UseProxy() { server.enqueue( MockResponse( code = HttpURLConnection.HTTP_USE_PROXY, headers = headersOf("Location", server.url("/").toString()),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K 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/MultipartReaderTest.kt
val partAbc = parts.nextPart()!! assertThat(partAbc.headers).isEqualTo( headersOf( "Content-Type", "text/plain; charset=utf-8", "Content-ID", "abc", ), ) assertThat(partAbc.body.readUtf8()).isEqualTo("abcd\r\nefgh") val partIjk = parts.nextPart()!! assertThat(partIjk.headers).isEqualTo( headersOf( "Content-Type",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.8K 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/CallTest.kt
assertThat(connect.headers["Private"]).isNull() assertThat(connect.headers["User-Agent"]).isEqualTo(USER_AGENT) assertThat(connect.headers["Proxy-Connection"]).isEqualTo("Keep-Alive") assertThat(connect.headers["Host"]).isEqualTo("android.com:443") val get = server.takeRequest() assertThat(get.headers["Private"]).isEqualTo("Secret") assertThat(get.headers["User-Agent"]).isEqualTo("App 1.0")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
fun partAccessors() { val body = MultipartBody.Builder() .addPart(headersOf("Foo", "Bar"), "Baz".toRequestBody(null)) .build() assertThat(body.parts.size).isEqualTo(1) val part1Buffer = Buffer() val part1 = body.part(0) part1.body.writeTo(part1Buffer) assertThat(part1.headers).isEqualTo(headersOf("Foo", "Bar")) assertThat(part1Buffer.readUtf8()).isEqualTo("Baz") } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestCommonTest.kt
val headers = headersOf("User-Agent", "RequestTest") val request = Request( url = url, headers = headers, ) assertThat(request.url).isEqualTo(url) assertThat(request.headers).isEqualTo(headers) assertThat(request.method).isEqualTo("GET") assertThat(request.body).isNull() assertThat(request.tags).isEmpty() } @Test fun constructorNoMethod() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
} @Test fun headers() { var headers: Headers = headersOf("", "") headers = mapOf("" to "").toHeaders() val get: String? = headers[""] val date: Date? = headers.getDate("") val instant: Instant? = headers.getInstant("") val size: Int = headers.size val name: String = headers.name(0) val value: String = headers.value(0) val names: Set<String> = headers.names()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0)