Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for MediaType (0.99 sec)

  1. android/guava/src/com/google/common/net/MediaType.java

        MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS));
        mediaType.parsedCharset = Optional.of(UTF_8);
        return mediaType;
      }
    
      private static MediaType addKnownType(MediaType mediaType) {
        KNOWN_TYPES.put(mediaType, mediaType);
        return mediaType;
      }
    
      /*
       * The following constants are grouped by their type and ordered alphabetically by the constant
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Aug 07 16:17:10 UTC 2023
    - 46.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/net/MediaType.java

        MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS));
        mediaType.parsedCharset = Optional.of(UTF_8);
        return mediaType;
      }
    
      private static MediaType addKnownType(MediaType mediaType) {
        KNOWN_TYPES.put(mediaType, mediaType);
        return mediaType;
      }
    
      /*
       * The following constants are grouped by their type and ordered alphabetically by the constant
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Aug 07 16:17:10 UTC 2023
    - 46.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/net/MediaTypeTest.java

        MediaType mediaType = MediaType.parse("text/plain");
        try {
          mediaType.withParameter("…", "a");
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testWithParameter_nonAsciiParameterValue() {
        MediaType mediaType = MediaType.parse("text/plain");
        try {
          mediaType.withParameter("a", "…");
          fail();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Mar 05 13:16:00 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/net/MediaTypeTest.java

        MediaType mediaType = MediaType.parse("text/plain");
        try {
          mediaType.withParameter("…", "a");
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testWithParameter_nonAsciiParameterValue() {
        MediaType mediaType = MediaType.parse("text/plain");
        try {
          mediaType.withParameter("a", "…");
          fail();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Mar 05 13:16:00 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    	type test struct {
    		name string
    
    		mediaType  string
    		out        []byte
    		outErrs    []error
    		req        *http.Request
    		statusCode int
    		object     runtime.Object
    
    		wantCode    int
    		wantHeaders http.Header
    	}
    	newTest := func() test {
    		return test{
    			name:      "compress on gzip",
    			out:       largePayload,
    			mediaType: "application/json",
    			req: &http.Request{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

      companion object {
        @JvmOverloads
        fun body(
          hex: String,
          charset: String? = null,
        ): ResponseBody {
          val mediaType = if (charset == null) null else "any/thing; charset=$charset".toMediaType()
          return hex.decodeHex().toResponseBody(mediaType)
        }
    
        fun exhaust(reader: Reader): String {
          val builder = StringBuilder()
          val buf = CharArray(10)
          var read: Int
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 13K bytes
    - Viewed (0)
  7. 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)
  8. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

        @JvmStatic
        @JvmName("create")
        fun ByteArray.toResponseBody(contentType: MediaType? = null): ResponseBody = commonToResponseBody(contentType)
    
        /** Returns a new response body that transmits this byte string. */
        @JvmStatic
        @JvmName("create")
        fun ByteString.toResponseBody(contentType: MediaType? = null): ResponseBody = commonToResponseBody(contentType)
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val keyPair: KeyPair = heldCertificate.keyPair()
      }
    
      @Test @Disabled
      fun mediaType() {
        val mediaType: MediaType = MediaType.get("")
        val type: String = mediaType.type()
        val subtype: String = mediaType.subtype()
        val parse: MediaType? = MediaType.parse("")
      }
    
      @Test @Disabled
      fun mockResponse() {
        val mockResponse = MockResponse()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
Back to top