- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for toHeaders (0.15 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) -
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) -
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) -
cmd/bucket-replication.go
Internal: minio.AdvancedGetOptions{ ReplicationProxyRequest: "true", }, PartNumber: opts.PartNumber, } // get correct offsets for encrypted object if rs != nil { h, err := rs.ToHeader() if err != nil { return nil, proxy, err } gopts.Set(xhttp.Range, h) } // Make sure to match ETag when proxying. if err = gopts.SetMatchETag(oi.ETag); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 06:49:55 UTC 2024 - 116.1K bytes - Viewed (0)