- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for namesAndValues (0.08 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/-HeadersCommon.kt
name: String, value: String, ) = apply { namesAndValues.add(name) namesAndValues.add(value.trim()) } internal fun Headers.Builder.commonRemoveAll(name: String) = apply { var i = 0 while (i < namesAndValues.size) { if (name.equals(namesAndValues[i], ignoreCase = true)) { namesAndValues.removeAt(i) // name namesAndValues.removeAt(i) // value i -= 2 }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersTest.kt
assertThat(headers.value(0)).isEqualTo("OkHttp") } @Test fun ofMapMakesDefensiveCopy() { val namesAndValues = mutableMapOf<String, String>() namesAndValues["User-Agent"] = "OkHttp" val headers = namesAndValues.toHeaders() namesAndValues["User-Agent"] = "Chrome" assertThat(headers.value(0)).isEqualTo("OkHttp") } @Test fun ofMapRejectsNullCharInName() {
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/main/kotlin/okhttp3/Headers.kt
@JvmStatic @JvmName("of") fun headersOf(vararg namesAndValues: String): Headers = commonHeadersOf(*namesAndValues) @JvmName("-deprecated_of") @Deprecated( message = "function name changed", replaceWith = ReplaceWith(expression = "headersOf(*namesAndValues)"), level = DeprecationLevel.ERROR, ) fun of(vararg namesAndValues: String): Headers { return headersOf(*namesAndValues)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.5K bytes - Viewed (0)