forked from parnurzeal/gorequest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.go
39 lines (35 loc) · 845 Bytes
/
constant.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package gorequest
// HTTP methods we support
const (
POST = "POST"
GET = "GET"
HEAD = "HEAD"
PUT = "PUT"
DELETE = "DELETE"
PATCH = "PATCH"
OPTIONS = "OPTIONS"
)
// Types we support.
const (
TypeJSON = "json"
TypeXML = "xml"
TypeUrlencoded = "urlencoded"
TypeForm = "form"
TypeFormData = "form-data"
TypeHTML = "html"
TypeText = "text"
TypeMultipart = "multipart"
)
var Types = map[string]string{
TypeJSON: "application/json",
TypeXML: "application/xml",
TypeForm: "application/x-www-form-urlencoded",
TypeFormData: "application/x-www-form-urlencoded",
TypeUrlencoded: "application/x-www-form-urlencoded",
TypeHTML: "text/html",
TypeText: "text/plain",
TypeMultipart: "multipart/form-data",
}
const (
MIMEJSON = "application/json"
)