- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 134 for contentLength (0.04 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
* [ResponseBody.source] always throws on such instances. * * It is safe and supported to call [ResponseBody.contentType] and [ResponseBody.contentLength] on * all instances of [ResponseBody]. */ @get:JvmName("body") val body: ResponseBody, /** * Non-null if this response is a successful upgrade ... */ @get:JvmName("socket") val socket: Socket?,
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartReaderTest.kt
headersOf("header-name", "header-value"), object : RequestBody() { override fun contentType() = "application/octet-stream".toMediaTypeOrNull() override fun contentLength() = 1024L * 1024L * 100L override fun writeTo(sink: BufferedSink) { val a1024x1024 = "a".repeat(1024 * 1024) repeat(100) { sink.writeUtf8(a1024x1024)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 15.4K bytes - Viewed (0) -
docs/changelogs/changelog_2x.md
* New: `Headers.of(Map)` creates headers from a Map. ## Version 2.2.0 _2014-12-30_ * **`RequestBody.contentLength()` now throws `IOException`.** This is a source-incompatible change. If you have code that calls `RequestBody.contentLength()`, your compile will break with this update. The change is binary-compatible, however: code compiled
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 26.6K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
} public fun body(body: Buffer): Builder = body(body.toMockResponseBody()) public fun body(body: MockResponseBody): Builder = apply { setHeader("Content-Length", body.contentLength) this.body = body } /** Sets the response body to the UTF-8 encoded bytes of [body]. */ public fun body(body: String): Builder = body(Buffer().writeUtf8(body))Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 17.8K bytes - Viewed (0) -
okhttp/api/android/okhttp.api
} public final class okhttp3/FormBody : okhttp3/RequestBody { public static final field Companion Lokhttp3/FormBody$Companion; public final fun -deprecated_size ()I public fun contentLength ()J public fun contentType ()Lokhttp3/MediaType; public final fun encodedName (I)Ljava/lang/String; public final fun encodedValue (I)Ljava/lang/String; public final fun name (I)Ljava/lang/String;Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.3K bytes - Viewed (0) -
cmd/utils.go
} r.Body = hash.NewChecker(r.Body, md5.New(), want, r.ContentLength) return true } cs, err := hash.GetContentChecksum(r.Header) if err != nil { return false } if cs == nil || !cs.Type.IsSet() { return false } if cs.Valid() && !cs.Type.Trailing() { r.Body = hash.NewChecker(r.Body, cs.Type.Hasher(), cs.Raw, r.ContentLength) } return true }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 33K bytes - Viewed (0) -
cmd/object-handlers.go
} // Get request range. rangeHeader := r.Header.Get(xhttp.Range) if rangeHeader != "" { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrUnsupportedRangeHeader), r.URL) return } if r.ContentLength <= 0 { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrEmptyRequestBody), r.URL) return } // Take read lock on object, here so subsequent lower-level // calls do not need to.
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 120.6K bytes - Viewed (0) -
cmd/api-router.go
commonS3Headers := []string{ xhttp.Date, xhttp.ETag, xhttp.ServerInfo, xhttp.Connection, xhttp.AcceptRanges, xhttp.ContentRange, xhttp.ContentEncoding, xhttp.ContentLength, xhttp.ContentType, xhttp.ContentDisposition, xhttp.LastModified, xhttp.ContentLanguage, xhttp.CacheControl, xhttp.RetryAfter, xhttp.AmzBucketRegion, xhttp.Expires, "X-Amz*",Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Oct 24 04:05:19 UTC 2025 - 23.3K bytes - Viewed (0) -
cmd/bucket-replication-handlers.go
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrReplicationNeedsVersioningError), r.URL) return } replicationConfig, err := replication.ParseConfig(io.LimitReader(r.Body, r.ContentLength)) if err != nil { apiErr := errorCodes.ToAPIErr(ErrMalformedXML) apiErr.Description = err.Error() writeErrorResponse(ctx, w, apiErr, r.URL) return }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 23.3K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
.Builder() .body("ab") .onResponseBody(CloseSocket()) .build(), ) val connection = server.url("/").toUrl().openConnection() assertThat(connection!!.contentLength).isEqualTo(2) val inputStream = connection.getInputStream() assertThat(inputStream!!.read()).isEqualTo('a'.code) try { val byteRead = inputStream.read() // OpenJDK behavior: end of stream.
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Aug 03 22:38:00 UTC 2025 - 28K bytes - Viewed (0)