- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 68 for ContentType (1.89 sec)
-
cmd/object-lambda-handlers_test.go
statusCode int body string contentType string expectStatus int }{ { name: "Success 206 Partial Content", statusCode: 206, body: "partial-object-data", contentType: "text/plain", expectStatus: 206, }, { name: "Success 200 OK", statusCode: 200, body: "full-object-data", contentType: "application/json", expectStatus: 200, },
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Jul 18 21:56:31 UTC 2025 - 5.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
val contentType = "text/plain; charset=utf-16be".toMediaType() val body = "\u0800".toRequestBody(contentType) assertThat(body.contentType()).isEqualTo(contentType) assertThat(body.contentLength()).isEqualTo(2) assertThat(bodyToHex(body)).isEqualTo("0800") } @Test fun byteArray() { val contentType = "text/plain".toMediaType() val body: RequestBody = "abc".toByteArray().toRequestBody(contentType)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 19K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
!contentEncoding.equals("gzip", ignoreCase = true) } private fun bodyIsStreaming(response: Response): Boolean { val contentType = response.body.contentType() return contentType != null && contentType.type == "text" && contentType.subtype == "event-stream" } companion object
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 11.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/OsddHelper.java
this.encoding = encoding; } /** * Sets the content type. * * @param contentType the content type */ public void setContentType(final String contentType) { this.contentType = contentType; }
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 4.7K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/it/ITBase.java
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 3.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/api/BaseApiManager.java
* @param text The text content to write. * @param contentType The content type for the response. * @param encoding The character encoding for the response. */ protected void write(final String text, final String contentType, final String encoding) { final StringBuilder buf = new StringBuilder(50); if (contentType == null) { buf.append("text/plain"); } else {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 5.9K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
} else { listener.onClosed(this) } } } private fun ResponseBody.isEventStream(): Boolean { val contentType = contentType() ?: return false return contentType.type == "text" && contentType.subtype == "event-stream" } override fun onFailure( call: Call, e: IOException, ) { listener.onFailure(this, e, null) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 3.3K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
System.out.printf("%03d: %s %s%n", responseCode, url, responseSource); String contentType = response.header("Content-Type"); if (responseCode != 200 || contentType == null) { return; } MediaType mediaType = MediaType.parse(contentType); if (mediaType == null || !mediaType.subtype().equalsIgnoreCase("html")) { return; }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jul 23 00:58:06 UTC 2025 - 5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt
} } private class ProgressRequestBody( private val delegate: RequestBody, private val progressListener: ProgressListener, ) : RequestBody() { override fun contentType() = delegate.contentType() @Throws(IOException::class) override fun contentLength(): Long = delegate.contentLength() @Throws(IOException::class) override fun writeTo(sink: BufferedSink) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 3.8K bytes - Viewed (0) -
cmd/api-headers.go
// Set Etag if available. if objInfo.ETag != "" { w.Header()[xhttp.ETag] = []string{"\"" + objInfo.ETag + "\""} } if objInfo.ContentType != "" { w.Header().Set(xhttp.ContentType, objInfo.ContentType) } if objInfo.ContentEncoding != "" { w.Header().Set(xhttp.ContentEncoding, objInfo.ContentEncoding) } if !objInfo.Expires.IsZero() {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 8.6K bytes - Viewed (0)