- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 82 for ContentType (0.08 sec)
-
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ResponseBody.kt
fun ByteString.toResponseBody(contentType: MediaType? = null): ResponseBody = commonToResponseBody(contentType) /** Returns a new response body that transmits this source. */ @JvmStatic @JvmName("create") fun BufferedSource.asResponseBody( contentType: MediaType? = null, contentLength: Long = -1L, ): ResponseBody = commonAsResponseBody(contentType, contentLength) @JvmStatic
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
} @Test fun stringClosesUnderlyingSource() { val closed = AtomicBoolean() val body: ResponseBody = object : ResponseBody() { override fun contentType(): MediaType? { return null } override fun contentLength(): Long { return 5 } override fun source(): BufferedSource {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 11.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
.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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.4K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/HcHttpClient.java
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu May 09 09:29:26 UTC 2024 - 41K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/MultipartBody.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.9K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/client/storage/StorageClientTest.java
.stream(new ByteArrayInputStream("file1".getBytes()), 5, -1).contentType("application/octet-stream").build()); minioClient.putObject(PutObjectArgs.builder().bucket(bucketName).object("dir1/file2.txt") .stream(new ByteArrayInputStream("file2".getBytes()), 5, -1).contentType("application/octet-stream").build());
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 13.5K bytes - Viewed (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; } }; }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Wed Oct 23 13:27:21 UTC 2024 - 18.6K bytes - Viewed (0) -
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, pdfPassword);
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Sat Oct 12 01:41:37 UTC 2024 - 25K bytes - Viewed (0)