Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for MediaType (0.16 sec)

  1. src/mime/mediatype.go

    // attribute to the attribute value with its case preserved.
    func ParseMediaType(v string) (mediatype string, params map[string]string, err error) {
    	base, _, _ := strings.Cut(v, ";")
    	mediatype = strings.TrimSpace(strings.ToLower(base))
    
    	err = checkMediaTypeDisposition(mediatype)
    	if err != nil {
    		return "", nil, err
    	}
    
    	params = make(map[string]string)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. okhttp/api/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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

    import okio.Buffer
    import okio.IOException
    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    internal class UnreadableResponseBody(
      private val mediaType: MediaType?,
      private val contentLength: Long,
    ) : ResponseBody(), Source {
      override fun contentType() = mediaType
    
      override fun contentLength() = contentLength
    
      override fun source() = buffer()
    
      override fun read(
        sink: Buffer,
        byteCount: Long,
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 15 13:24:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. fastapi/openapi/models.py

        content: Optional[Dict[str, MediaType]] = None
    
    
    class Parameter(ParameterBase):
        name: str
        in_: ParameterInType = Field(alias="in")
    
    
    class Header(ParameterBase):
        pass
    
    
    class RequestBody(BaseModelWithConfig):
        description: Optional[str] = None
        content: Dict[str, MediaType]
        required: Optional[bool] = None
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 22:49:33 UTC 2024
    - 15K bytes
    - Viewed (0)
  7. cmd/auth-handler.go

    	return ok
    }
    
    // Verify if request has AWS Post policy Signature Version '4'.
    func isRequestPostPolicySignatureV4(r *http.Request) bool {
    	mediaType, _, err := mime.ParseMediaType(r.Header.Get(xhttp.ContentType))
    	if err != nil {
    		return false
    	}
    	return mediaType == "multipart/form-data" && r.Method == http.MethodPost
    }
    
    // Verify if the request has AWS Streaming Signature Version '4'. This is only valid for 'PUT' operation.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 26K bytes
    - Viewed (0)
  8. pkg/wasm/cache_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// Set manifest type.
    	manifest, err := img.Manifest()
    	if err != nil {
    		t.Fatal(err)
    	}
    	manifest.MediaType = types.DockerManifestSchema2
    
    	// Push image to the registry.
    	err = crane.Push(img, ref, fetchOpt)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// Push image to the registry with latest tag as well
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/config_test.go

    }
    
    func TestNewErrorForbiddenSerializer(t *testing.T) {
    	config := CompletedConfig{
    		&completedConfig{
    			Config: &Config{
    				Serializer: runtime.NewSimpleNegotiatedSerializer(runtime.SerializerInfo{
    					MediaType: "application/cbor",
    				}),
    			},
    		},
    	}
    	_, err := config.New("test", NewEmptyDelegate())
    	if err == nil {
    		t.Error("successfully created a new server configured with cbor support")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  10. pilot/cmd/pilot-agent/status/server.go

    	FmtText              = `text/plain; version=` + expfmt.TextVersion + `; charset=utf-8`
    )
    
    func negotiateMetricsFormat(contentType string) expfmt.Format {
    	mediaType, params, err := mime.ParseMediaType(contentType)
    	if err == nil && mediaType == expfmt.OpenMetricsType {
    		switch params["version"] {
    		case expfmt.OpenMetricsVersion_1_0_0:
    			return FmtOpenMetrics_1_0_0
    		case expfmt.OpenMetricsVersion_0_0_1, "":
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 31.1K bytes
    - Viewed (1)
Back to top