-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhedrs.go
45 lines (41 loc) · 1.34 KB
/
hedrs.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
40
41
42
43
44
45
package hedrs
import "net/http"
// request constants ...
const (
Accept = "Accept"
AcceptEncoding = "Accept-Encoding"
AcceptVersion = "Accept-Version"
AccessControlRequestHeaders = "Access-Control-Request-Headers"
AccessControlRequestMethod = "Access-Control-Request-Method"
APIVersion = "X-Api-Version"
Authorization = "Authorization"
ContentLength = "Content-Length"
ContentMD5 = "Content-MD5"
ContentType = "Content-Type"
CSRFToken = "X-CSRF-Token"
Date = "Date"
Origin = "Origin"
RequestedWith = "X-Requested-With"
)
// response constants ...
const (
AccessControlAllowCredentials = "Access-Control-Allow-Credentials"
AccessControlAllowHeaders = "Access-Control-Allow-Headers"
AccessControlAllowMethods = "Access-Control-Allow-Methods"
AccessControlAllowOrigin = "Access-Control-Allow-Origin"
AccessControlExposeHeaders = "Access-Control-Expose-Headers"
AccessControlMaxAge = "Access-Control-Max-Age"
)
var (
// AllMethods ...
AllMethods = []string{
http.MethodOptions,
http.MethodGet,
http.MethodPut,
http.MethodHead,
http.MethodPost,
http.MethodDelete,
http.MethodPatch,
http.MethodTrace,
}
)