Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for mediaType (0.09 sec)

  1. src/main/java/org/codelibs/fess/util/SearchEngineUtil.java

         * @param mediaType the media type for the content builder
         * @return an OutputStream containing the built content, or an empty ByteArrayOutputStream if an error occurs
         */
        public static OutputStream getXContentBuilderOutputStream(final XContentBuilderCallback func, final MediaType mediaType) {
            try (final XContentBuilder builder = func.apply(mediaType.contentBuilder(), ToXContent.EMPTY_PARAMS)) {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  2. okhttp/api/jvm/okhttp.api

    	public static final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun mediaType() {
        val mediaType: MediaType = "".toMediaType()
        val defaultCharset: Charset? = mediaType.charset()
        val charset: Charset? = mediaType.charset(Charsets.UTF_8)
        val type: String = mediaType.type
        val subtype: String = mediaType.subtype
        val parse: MediaType? = "".toMediaTypeOrNull()
      }
    
      @Test
      fun mockResponse() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/net/MediaTypeTest.java

            MediaType.parse("text/plain; a=1; a=2").withParameter("a", "3"));
        assertEquals(
            MediaType.parse("text/plain; a=1; a=2; b=3"),
            MediaType.parse("text/plain; a=1; a=2").withParameter("b", "3"));
      }
    
      public void testWithParameter_invalidAttribute() {
        MediaType mediaType = MediaType.parse("text/plain");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 20.4K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt

            "]}",
        )
      }
    
      @Test
      fun gzip() {
        val mediaType = "text/plain; charset=utf-8".toMediaType()
        val originalBody = "This is the original message".toRequestBody(mediaType)
        assertThat(originalBody.contentLength()).isEqualTo(28L)
        assertThat(originalBody.contentType()).isEqualTo(mediaType)
    
        val request =
          Request
            .Builder()
            .url("https://square.com/")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 19K bytes
    - Viewed (0)
  6. okhttp/api/android/okhttp.api

    	public static final fun create (Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;
    	public static final fun create (Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  7. 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: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jul 23 00:58:06 UTC 2025
    - 5K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/UploadProgress.java

    import java.io.File;
    import java.io.IOException;
    
    public final class UploadProgress {
      private static final String IMGUR_CLIENT_ID = "9199fdef135c122";
      private static final MediaType MEDIA_TYPE_PNG = MediaType.get("image/png");
    
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 4.2K bytes
    - Viewed (1)
  9. docs/recipes.md

    === ":material-language-java: Java"
        ```java
          public static final MediaType MEDIA_TYPE_MARKDOWN
              = MediaType.parse("text/x-markdown; charset=utf-8");
    
          private final OkHttpClient client = new OkHttpClient();
    
          public void run() throws Exception {
            RequestBody requestBody = new RequestBody() {
              @Override public MediaType contentType() {
                return MEDIA_TYPE_MARKDOWN;
              }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

          override fun contentType(): MediaType = "application/xml".toMediaType()
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<el")
            sink.flush()
            throw IOException("failed to stream the XML")
          }
        }
    
        class ValidRequestBody : RequestBody() {
          override fun contentType(): MediaType = "application/xml".toMediaType()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 8.4K bytes
    - Viewed (0)
Back to top