- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 120 for MediaType (0.23 sec)
-
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
*/ package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okio.BufferedSink; public final class PostStreaming { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient();
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
* limitations under the License. */ @file:Suppress("ktlint:standard:filename") package okhttp3.curl.internal import java.io.IOException import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.curl.Main import okhttp3.internal.http.StatusLine import okio.sink
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go
if framer == nil { return nil, fmt.Errorf("no framer defined for %q available for embedded encoding", serializer.MediaType) } // TODO: next step, get back mediaTypeOptions from negotiate and return the exact value here mediaType := serializer.MediaType if mediaType != runtime.ContentTypeJSON { mediaType += ";stream=watch" } ctx := req.Context() // locate the appropriate embedded encoder based on the transform
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Dec 14 16:37:25 UTC 2023 - 11.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
*/ package okhttp3.recipes; import java.io.File; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public final class PostFile { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient();
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/RealResponseBody.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.internal.http import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.ResponseBody import okio.BufferedSource class RealResponseBody( /**
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
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; } Document document = Jsoup.parse(response.body().string(), url.toString());
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 4.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyTest.kt
import okio.Source import okio.buffer class ResponseBodyTest { @Test fun sourceEmpty() { val mediaType = if (null == null) null else "any/thing; charset=${null}".toMediaType() val body = "".decodeHex().toResponseBody(mediaType) val source = body.source() assertThat(source.exhausted()).isTrue() assertThat(source.readUtf8()).isEqualTo("") } @Test fun sourceClosesUnderlyingSource() {
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/-RequestBodyCommon.kt
* limitations under the License. */ @file:Suppress("ktlint:standard:filename") package okhttp3.internal import okhttp3.MediaType import okhttp3.RequestBody import okio.BufferedSink import okio.ByteString fun ByteArray.commonToRequestBody( contentType: MediaType?, offset: Int, byteCount: Int, ): RequestBody { checkOffsetAndCount(size.toLong(), offset.toLong(), byteCount.toLong())
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java
package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okio.BufferedSink; import okio.Okio; import okio.Pipe; public final class PostStreamingWithPipe { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8");
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 3.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostString.java
*/ package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public final class PostString { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient();
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.7K bytes - Viewed (0)