- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 287 for contentTypes (0.24 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/-RequestBodyCommon.kt
import okio.BufferedSink import okio.ByteString fun ByteArray.commonToRequestBody( contentType: MediaType?, offset: Int, byteCount: Int, ): RequestBody { checkOffsetAndCount(size.toLong(), offset.toLong(), byteCount.toLong()) return object : RequestBody() { override fun contentType() = contentType override fun contentLength() = byteCount.toLong() override fun writeTo(sink: BufferedSink) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.7K 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
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.7K bytes - Viewed (0) -
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)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt
val userRequest = chain.request() val requestBuilder = userRequest.newBuilder() val body = userRequest.body if (body != null) { val contentType = body.contentType() if (contentType != null) { requestBuilder.header("Content-Type", contentType.toString()) } val contentLength = body.contentLength() if (contentLength != -1L) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.2K bytes - Viewed (2) -
src/test/java/org/codelibs/fess/it/ITBase.java
Java - Registered: Mon Apr 22 08:04:10 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 3.3K bytes - Viewed (0) -
src/test/java/org/codelibs/core/net/MimeTypeUtilTest.java
final String contentType = MimeTypeUtil.guessContentType(path); assertEquals("text/html", contentType); } /** * @throws Exception */ @Test public void testGetFromStream_gif() throws Exception { final String path = ClassUtil.getPackageName(this.getClass()).replaceAll("\\.", "/") + "/ccc.gif"; final String contentType = MimeTypeUtil.guessContentType(path);
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt
internal fun ByteArray.commonToResponseBody(contentType: MediaType?): ResponseBody { return Buffer() .write(this) .asResponseBody(contentType, size.toLong()) } internal fun ByteString.commonToResponseBody(contentType: MediaType?): ResponseBody { return Buffer() .write(this) .asResponseBody(contentType, size.toLong()) } internal fun BufferedSource.commonAsResponseBody(
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/mylasta/direction/sponsor/FessMultipartRequestHandler.java
@Override protected byte[] getBoundary(final String contentType) { // for security final byte[] boundary = super.getBoundary(contentType); checkBoundarySize(contentType, boundary); return boundary; } }; } protected void checkBoundarySize(final String contentType, final byte[] boundary) { final int boundarySize = boundary.length;
Java - Registered: Mon Apr 22 08:04:10 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
fun ByteString.toRequestBody(contentType: MediaType? = null): RequestBody = commonToRequestBody(contentType) /** Returns a new request body that transmits this. */ @JvmStatic @JvmName("create") @ExperimentalOkHttpApi fun FileDescriptor.toRequestBody(contentType: MediaType? = null): RequestBody { return object : RequestBody() { override fun contentType() = contentType
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Jan 25 14:41:37 GMT 2024 - 9.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/OsddHelper.java
this.osddPath = osddPath; } public void setEncoding(final String encoding) { this.encoding = encoding; } public void setContentType(final String contentType) { this.contentType = contentType; }
Java - Registered: Mon Apr 22 08:04:10 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 3.7K bytes - Viewed (0)