-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmethod_constants.go
More file actions
40 lines (38 loc) · 1.12 KB
/
method_constants.go
File metadata and controls
40 lines (38 loc) · 1.12 KB
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
package dic
// Methods Структура справочника HTTP методов запросов.
type Methods struct {
// Get HTTP метод GET.
Get IMethod
// Post HTTP метод POST.
Post IMethod
// Put HTTP метод PUT.
Put IMethod
// Delete HTTP метод DELETE.
Delete IMethod
// Connect HTTP метод CONNECT.
Connect IMethod
// Head HTTP метод HEAD.
Head IMethod
// Patch HTTP метод PATCH.
Patch IMethod
// Options HTTP метод OPTIONS.
Options IMethod
// Trace HTTP метод TRACE.
Trace IMethod
// Stub HTTP метод STUB.
Stub IMethod
}
func init() {
singletonMethod = Methods{
Get: &tMethod{name: "GET", bits: 1 << 0},
Post: &tMethod{name: "POST", bits: 1 << 1},
Put: &tMethod{name: "PUT", bits: 1 << 2},
Delete: &tMethod{name: "DELETE", bits: 1 << 3},
Connect: &tMethod{name: "CONNECT", bits: 1 << 4},
Head: &tMethod{name: "HEAD", bits: 1 << 5},
Patch: &tMethod{name: "PATCH", bits: 1 << 6},
Options: &tMethod{name: "OPTIONS", bits: 1 << 7},
Trace: &tMethod{name: "TRACE", bits: 1 << 8},
Stub: &tMethod{name: "STUB", bits: 1 << 9},
}
}