- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for toHeaders (0.2 sec)
-
okhttp/src/test/java/okhttp3/HeadersTest.kt
assertFailsWith<IllegalArgumentException> { mapOf("" to "OkHttp").toHeaders() } } @Test fun ofMapThrowsOnBlankName() { assertFailsWith<IllegalArgumentException> { mapOf(" " to "OkHttp").toHeaders() } } @Test fun ofMapAcceptsEmptyValue() { val headers = mapOf("User-Agent" to "").toHeaders() assertThat(headers.value(0)).isEqualTo("") } @Test fun ofMapTrimsKey() {
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/HeadersJvmTest.kt
import assertk.assertThat import assertk.assertions.containsExactly import assertk.assertions.isEqualTo import java.time.Instant import java.util.Date import kotlin.test.assertFailsWith import okhttp3.Headers.Companion.toHeaders import okhttp3.internal.EMPTY_HEADERS import org.junit.jupiter.api.Test class HeadersJvmTest { @Test fun byteCount() { assertThat(EMPTY_HEADERS.byteCount()).isEqualTo(0L) assertThat(
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/main/kotlin/okhttp3/Headers.kt
@JvmName("of") fun Map<String, String>.toHeaders(): Headers = commonToHeaders() @JvmName("-deprecated_of") @Deprecated( message = "function moved to extension", replaceWith = ReplaceWith(expression = "headers.toHeaders()"), level = DeprecationLevel.ERROR, ) fun of(headers: Map<String, String>): Headers { return headers.toHeaders() } }
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/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
import okhttp3.internal.okHttpName import okhttp3.internal.peerName import okhttp3.internal.platform.Platform import okhttp3.internal.platform.Platform.Companion.INFO import okhttp3.internal.toHeaders import okio.Buffer import okio.BufferedSink import okio.BufferedSource import okio.ByteString import okio.buffer import okio.sink import okio.source /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 32.6K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
| :---------------------------------- | :------------------------------ | | Handshake.get(SSLSession) | SSLSession.handshake() | | Headers.of(Map<String, String>) | Map<String, String>.toHeaders() | | HttpUrl.get(String) | String.toHttpUrl() | | HttpUrl.get(URI) | URI.toHttpUrlOrNull() | | HttpUrl.get(URL) | URL.toHttpUrlOrNull() |
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
require(millis <= Integer.MAX_VALUE) { "$name too large" } require(millis != 0L || !duration.isPositive()) { "$name too small" } return millis.toInt() } internal fun List<Header>.toHeaders(): Headers { val builder = Headers.Builder() for ((name, value) in this) { builder.addLenient(name.utf8(), value.utf8()) } return builder.build() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
import javax.net.ssl.X509KeyManager import javax.net.ssl.X509TrustManager import okhttp3.Handshake.Companion.handshake import okhttp3.Headers.Companion.headersOf import okhttp3.Headers.Companion.toHeaders import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.MediaType.Companion.toMediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull
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-android/src/main/baseline-prof.txt
HSPLokhttp3/internal/_UtilJvmKt;->immutableListOf([Ljava/lang/Object;)Ljava/util/List; HSPLokhttp3/internal/_UtilJvmKt;->readBomAsCharset(Lokio/BufferedSource;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset; HSPLokhttp3/internal/_UtilJvmKt;->toHeaders(Ljava/util/List;)Lokhttp3/Headers; HSPLokhttp3/internal/_UtilJvmKt;->toHostHeader(Lokhttp3/HttpUrl;Z)Ljava/lang/String; HSPLokhttp3/internal/_UtilJvmKt;->toImmutableList(Ljava/util/List;)Ljava/util/List;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Mar 21 11:22:00 UTC 2022 - 127.9K bytes - Viewed (0) -
cmd/httprange.go
return "" } off, length, err := h.GetOffsetLength(resourceSize) if err != nil { return "" } return fmt.Sprintf("%d-%d", off, off+length-1) } // ToHeader returns the Range header value. func (h *HTTPRangeSpec) ToHeader() (string, error) { if h == nil { return "", nil } start := strconv.Itoa(int(h.Start)) end := strconv.Itoa(int(h.End)) switch { case h.Start >= 0 && h.End >= 0:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 08:44:07 UTC 2024 - 5.9K bytes - Viewed (0) -
cmd/httprange_test.go
if err != nil { if !testCase.errExpected || err == nil && testCase.errExpected { t.Errorf("unexpected err: %v", err) } continue } h, err := rs.ToHeader() if err != nil && !testCase.errExpected || err == nil && testCase.errExpected { t.Errorf("expected error with invalid range: %v", err) } if h != testCase.spec {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun May 05 16:56:21 UTC 2024 - 3.7K bytes - Viewed (0)