Home | History | Annotate | Download | only in http

Lines Matching refs:Form

35 	req.Header.Set("Content-Type", "application/x-www-form-urlencoded; param=value")
49 if qs := req.Form["q"]; !reflect.DeepEqual(qs, []string{"foo", "bar"}) {
50 t.Errorf(`req.Form["q"] = %q, want ["foo", "bar"]`, qs)
52 if both := req.Form["both"]; !reflect.DeepEqual(both, []string{"y", "x"}) {
53 t.Errorf(`req.Form["both"] = %q, want ["y", "x"]`, both)
58 if orphan := req.Form["orphan"]; !reflect.DeepEqual(orphan, []string{"", "nope"}) {
61 if empty := req.Form["empty"]; !reflect.DeepEqual(empty, []string{"", "not"}) {
64 if nokey := req.Form[""]; !reflect.DeepEqual(nokey, []string{"nokey"}) {
69 // Tests that we only parse the form automatically for certain methods.
74 req.Header.Set("Content-Type", "application/x-www-form-urlencoded; param=value")
125 if req.Form == nil {
126 t.Errorf("%d. Form not initialized, error %v", i, err)
137 Header: Header{"Content-Type": {`multipart/form-data; boundary="foo123"`}},
156 Content-Disposition: form-data; name="field1"
160 Content-Disposition: form-data; name="field2"
164 Content-Disposition: form-data; name="file"; filename="file"
173 Header: Header{"Content-Type": {`multipart/form-data; boundary=xxx`}},
184 req.Form = make(url.Values)
186 req.Form.Add(k, v)
201 if !reflect.DeepEqual(req.Form, wantForm) {
202 t.Fatalf("req.Form = %v, want %v", req.Form, wantForm)
217 Header: Header{"Content-Type": {`multipart/form-data; boundary="foo123"`}},
307 req.Header.Set("Content-Type", "application/x-www-form-urlencoded; param=value")
308 if req.Form != nil {
309 t.Fatal("Unexpected request Form, want nil")
312 if req.Form == nil {
320 if req.Form != nil {
321 t.Fatal("Unexpected request Form, want nil")
324 if req.Form == nil {
848 ctype := fmt.Sprintf(`multipart/form-data; boundary="%s"`, boundary)
914 Content-Disposition: form-data; name="filea"; filename="filea.txt"
919 Content-Disposition: form-data; name="fileb"; filename="fileb.txt"
924 Content-Disposition: form-data; name="texta"
928 Content-Disposition: form-data; name="textb"