-
Notifications
You must be signed in to change notification settings - Fork 55
/
requester.go
53 lines (40 loc) · 1.12 KB
/
requester.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
package zhttp
import (
"time"
)
func DisableChunke(enable ...bool) {
std.DisableChunke(enable...)
}
func Get(url string, v ...interface{}) (*Res, error) {
return std.Get(url, v...)
}
func Post(url string, v ...interface{}) (*Res, error) {
return std.Post(url, v...)
}
func Put(url string, v ...interface{}) (*Res, error) {
return std.Put(url, v...)
}
func Head(url string, v ...interface{}) (*Res, error) {
return std.Head(url, v...)
}
func Options(url string, v ...interface{}) (*Res, error) {
return std.Options(url, v...)
}
func Delete(url string, v ...interface{}) (*Res, error) {
return std.Delete(url, v...)
}
func Patch(url string, v ...interface{}) (*Res, error) {
return std.Patch(url, v...)
}
func Connect(url string, v ...interface{}) (*Res, error) {
return std.Connect(url, v...)
}
func Trace(url string, v ...interface{}) (*Res, error) {
return std.Trace(url, v...)
}
func Do(method, rawurl string, v ...interface{}) (resp *Res, err error) {
return std.Do(method, rawurl, v...)
}
func DoRetry(attempt int, sleep time.Duration, fn func() (*Res, error)) (*Res, error) {
return std.DoRetry(attempt, sleep, fn)
}