-
Notifications
You must be signed in to change notification settings - Fork 0
/
methods.go
64 lines (57 loc) · 1.17 KB
/
methods.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package structuredhttp
// GET adds support for a GET request.
func GET(URL string) *Request {
return &Request{
URL: URL,
Method: "GET",
Headers: map[string]string{},
}
}
// POST adds support for a POST request.
func POST(URL string) *Request {
return &Request{
URL: URL,
Method: "POST",
Headers: map[string]string{},
}
}
// PUT adds support for a PUT request.
func PUT(URL string) *Request {
return &Request{
URL: URL,
Method: "PUT",
Headers: map[string]string{},
}
}
// PATCH adds support for a PATCH request.
func PATCH(URL string) *Request {
return &Request{
URL: URL,
Method: "PATCH",
Headers: map[string]string{},
}
}
// DELETE adds support for a DELETE request.
func DELETE(URL string) *Request {
return &Request{
URL: URL,
Method: "DELETE",
Headers: map[string]string{},
}
}
// OPTIONS adds support for a OPTIONS request.
func OPTIONS(URL string) *Request {
return &Request{
URL: URL,
Method: "OPTIONS",
Headers: map[string]string{},
}
}
// HEAD adds support for a HEAD request.
func HEAD(URL string) *Request {
return &Request{
URL: URL,
Method: "HEAD",
Headers: map[string]string{},
}
}