- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 184 for headersOf (0.11 sec)
-
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/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) -
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/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) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.SocketPolicy.DisconnectAfterRequest import mockwebserver3.SocketPolicy.DisconnectAtEnd import okhttp3.Headers.Companion.headersOf import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.internal.closeQuietly
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
client.listener.assertTextMessage(message) } @Test fun messagesCompressedWhenConfigured() { val headers = headersOf("Sec-WebSocket-Extensions", "permessage-deflate") client.initWebSocket(random, responseHeaders = headers) server.initWebSocket(random, responseHeaders = headers) val message = repeat('a', RealWebSocket.DEFAULT_MINIMUM_DEFLATE_SIZE.toInt()) server.webSocket!!.send(message)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 01:59:58 UTC 2024 - 18.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Request.kt
/** Removes all headers named [name] on this builder. */ open fun removeHeader(name: String) = commonRemoveHeader(name) /** Removes all headers on this builder and adds [headers]. */ open fun headers(headers: Headers) = commonHeaders(headers) /** * Sets this request's `Cache-Control` header, replacing any cache control headers already
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:17:44 UTC 2024 - 10.5K bytes - Viewed (0)