- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 281 for ContentType (0.15 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt
open class ForwardingRequestBody( delegate: RequestBody?, ) : RequestBody() { private val delegate: RequestBody fun delegate(): RequestBody = delegate override fun contentType(): MediaType? = 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: Wed Mar 19 19:25:20 UTC 2025 - 1.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) -
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
val body = request.body assertThat(request.method).isEqualTo("POST") assertThat(request.url.toString()).isEqualTo("http://example.com/") assertThat(body!!.contentType().toString()).isEqualTo( "application/x-www-form-urlencoded; charset=utf-8", ) assertThat(bodyAsString(body)).isEqualTo("foo") } @Test fun dataPut() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K 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 Sep 04 12:52:25 UTC 2025 - Last Modified: Sat Mar 15 06:53:53 UTC 2025 - 18.6K 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) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt
assertThat(source.readUtf8()).isEqualTo("") } @Test fun sourceClosesUnderlyingSource() { var closed = false val body: ResponseBody = object : ResponseBody() { override fun contentType(): MediaType? = null override fun contentLength(): Long = 5 override fun source(): BufferedSource { val source = Buffer().writeUtf8("hello")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/GzipRequestBody.kt
import okhttp3.RequestBody import okio.BufferedSink import okio.GzipSink import okio.buffer internal class GzipRequestBody( val delegate: RequestBody, ) : RequestBody() { override fun contentType() = delegate.contentType() // We don't know the compressed length in advance! override fun contentLength() = -1L override fun writeTo(sink: BufferedSink) { GzipSink(sink).buffer().use(delegate::writeTo) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 1.1K bytes - Viewed (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
.setStatus("HTTP/1.1 200") .setBody(fileToBytes(file)) .addHeader("content-type: " + contentType(path)); } private Buffer fileToBytes(File file) throws IOException { Buffer result = new Buffer(); result.writeAll(Okio.source(file)); return result; } private String contentType(String path) { if (path.endsWith(".png")) return "image/png";
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jan 02 02:50:44 UTC 2019 - 4.7K bytes - Viewed (0) -
src/main/webapp/WEB-INF/orig/view/searchNoResult.jsp
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> <%-- query did not match any document --%> <div id="result" class="row"> <div class="col-md-8 alert alert-info"> <la:message key="labels.did_not_match" arg0="${displayQuery}" /> </div> <div class="col-md-4"><%-- Side Content --%></div>
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Sun Jan 12 06:14:02 UTC 2025 - 318 bytes - Viewed (0)