- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 92 for ContentType (0.13 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt
val buffer = Buffer().writeString(this, charset) return buffer.asResponseBody(finalContentType, buffer.size) } /** Returns a new response body that transmits this byte array. */ @JvmStatic @JvmName("create") fun ByteArray.toResponseBody(contentType: MediaType? = null): ResponseBody = Buffer() .write(this)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue May 27 14:51:25 GMT 2025 - 11.6K bytes - Click Count (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)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Oct 24 11:36:14 GMT 2025 - 24.4K bytes - Click Count (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
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Nov 07 02:57:33 GMT 2025 - 11.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartBodyTest.kt
.Builder("123") .addPart("Hello, World!".toRequestBody(null)) .build() assertThat(body.boundary).isEqualTo("123") assertThat(body.type).isEqualTo(MultipartBody.MIXED) assertThat(body.contentType().toString()) .isEqualTo("multipart/mixed; boundary=123") assertThat(body.parts.size).isEqualTo(1) assertThat(body.contentLength()).isEqualTo(33L) val buffer = Buffer() body.writeTo(buffer)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 10.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartBody.kt
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 10.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyJvmTest.kt
} @Test fun stringClosesUnderlyingSource() { val closed = AtomicBoolean() val body: ResponseBody = object : ResponseBody() { override fun contentType(): MediaType? = null override fun contentLength(): Long = 5 override fun source(): BufferedSource { val source = Buffer().writeUtf8("hello")
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 12.4K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/mylasta/direction/sponsor/FessMultipartRequestHandler.java
return new JakartaServletDiskFileUpload(fileItemFactory) { @Override public byte[] getBoundary(final String contentType) { // for security final byte[] boundary = super.getBoundary(contentType); checkBoundarySize(contentType, boundary); return boundary; } }; }
Created: Sat Dec 20 09:19:18 GMT 2025 - Last Modified: Sat Mar 15 06:53:53 GMT 2025 - 18.6K bytes - Click Count (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt
} // Append headers. for ((name, value) in headers) { if (contentType != null && name.equals("Content-Type", ignoreCase = true)) continue append(" \\\n -H ${"$name: $value".shellEscape()}") } if (contentType != null) { append(" \\\n -H ${"Content-Type: $contentType".shellEscape()}") } // Append body if present.Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Oct 30 13:46:58 GMT 2025 - 14.7K bytes - Click Count (1) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/TikaExtractor.java
}, contentEncoding, normalizeText); } if (StringUtil.isBlank(content) && contentType != null) { if (logger.isDebugEnabled()) { logger.debug("retry without a content type: {}", contentType); } final Metadata metadata3 = createMetadata(null, null, contentEncoding, password);Created: Sat Dec 20 11:21:39 GMT 2025 - Last Modified: Sun Nov 23 12:19:14 GMT 2025 - 30.8K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/storage/S3StorageClient.java
} @Override public void uploadObject(final String objectName, final InputStream inputStream, final long size, final String contentType) { try { final PutObjectRequest request = PutObjectRequest.builder().bucket(bucket).key(objectName).contentType(contentType).contentLength(size).build(); s3Client.putObject(request, RequestBody.fromInputStream(inputStream, size));Created: Sat Dec 20 09:19:18 GMT 2025 - Last Modified: Sat Dec 13 02:21:17 GMT 2025 - 10.9K bytes - Click Count (0)