Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for FormDataContentType (0.54 sec)

  1. src/mime/multipart/writer.go

    				continue
    			}
    		}
    		return errors.New("mime: invalid boundary character")
    	}
    	w.boundary = boundary
    	return nil
    }
    
    // FormDataContentType returns the Content-Type for an HTTP
    // multipart/form-data with this [Writer]'s Boundary.
    func (w *Writer) FormDataContentType() string {
    	b := w.boundary
    	// We must quote the boundary if it contains any of the
    	// tspecials characters defined by RFC 2045, or space.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. cmd/post-policy_test.go

    	req, err := http.NewRequest(http.MethodPost, makeTestTargetURL(endPoint, bucketName, "", nil), reader)
    	if err != nil {
    		return nil, err
    	}
    
    	// Set form content-type.
    	req.Header.Set("Content-Type", w.FormDataContentType())
    	return req, nil
    }
    
    func buildGenericPolicy(t time.Time, accessKey, region, bucketName, objectName string, contentLengthRange bool) []byte {
    	// Expire the request five minutes from now.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  3. src/net/http/request_test.go

    		t.Fatal(err)
    	}
    	if err := mw.Close(); err != nil {
    		t.Fatal(err)
    	}
    	req, err := NewRequest("POST", cst.URL, fBuf)
    	if err != nil {
    		t.Fatal(err)
    	}
    	req.Header.Set("Content-Type", mw.FormDataContentType())
    	res, err := cst.Client().Do(req)
    	if err != nil {
    		t.Fatal(err)
    	}
    	res.Body.Close()
    	if g, w := res.StatusCode, StatusOK; g != w {
    		t.Fatalf("Status code mismatch: got %d, want %d", g, w)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  4. src/net/http/serve_test.go

    	}
    	if err := mw.Close(); err != nil {
    		t.Fatal(err)
    	}
    	req, err := NewRequest("POST", cst.ts.URL, fBuf)
    	if err != nil {
    		t.Fatal(err)
    	}
    	req.Header.Set("Content-Type", mw.FormDataContentType())
    	res, err := cst.c.Do(req)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer res.Body.Close()
    	fname, err := io.ReadAll(res.Body)
    	if err != nil {
    		t.Fatal(err)
    	}
    	cst.close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Writer).Close", Method, 0},
    		{"(*Writer).CreateFormField", Method, 0},
    		{"(*Writer).CreateFormFile", Method, 0},
    		{"(*Writer).CreatePart", Method, 0},
    		{"(*Writer).FormDataContentType", Method, 0},
    		{"(*Writer).SetBoundary", Method, 1},
    		{"(*Writer).WriteField", Method, 0},
    		{"ErrMessageTooLarge", Var, 9},
    		{"File", Type, 0},
    		{"FileHeader", Type, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top