Versions in this module Expand all Collapse all v1 v1.0.1 Dec 28, 2022 v1.0.0 Dec 28, 2022 Changes in this version + var DefaultBenchClient = http.Client + var DefaultClient = http.Client + var GlobalSetting = setting.Setting + func Register(name string, filter NewFilter) + type Bencher interface + Concurrent func(c int) Bencher + Do func() error + Durations func(d time.Duration) Bencher + GetReport func(r *bench.Report) Bencher + Loop func(func(c *Context) error) Bencher + Number func(n int) Bencher + Rate func(rate int) Bencher + type Context struct + Code int + Error error + type Curl interface + Do func() error + GenAndSend func() Curl + LongOption func() Curl + SetOutput func(w io.Writer) Curl + type DataFlow struct + func DELETE(url string) *DataFlow + func GET(url string) *DataFlow + func HEAD(url string) *DataFlow + func OPTIONS(url string) *DataFlow + func PATCH(url string) *DataFlow + func POST(url string) *DataFlow + func PUT(url string) *DataFlow + func (df *DataFlow) AutoDecodeBody() *DataFlow + func (df *DataFlow) BindBody(obj interface{}) *DataFlow + func (df *DataFlow) BindHeader(obj interface{}) *DataFlow + func (df *DataFlow) BindJSON(obj interface{}) *DataFlow + func (df *DataFlow) BindXML(obj interface{}) *DataFlow + func (df *DataFlow) BindYAML(obj interface{}) *DataFlow + func (df *DataFlow) Callback(cb func(*Context) error) *DataFlow + func (df *DataFlow) Chunked() *DataFlow + func (df *DataFlow) Code(httpCode *int) *DataFlow + func (df *DataFlow) DELETE(url string) *DataFlow + func (df *DataFlow) Debug(d ...interface{}) *DataFlow + func (df *DataFlow) Do() (err error) + func (df *DataFlow) E() *export + func (df *DataFlow) Export() *export + func (df *DataFlow) F() *filter + func (df *DataFlow) Filter() *filter + func (df *DataFlow) GET(url string) *DataFlow + func (df *DataFlow) GetHost() (string, error) + func (df *DataFlow) HEAD(url string) *DataFlow + func (df *DataFlow) IsDebug() bool + func (df *DataFlow) NoAutoContentType() *DataFlow + func (df *DataFlow) OPTIONS(url string) *DataFlow + func (df *DataFlow) PATCH(url string) *DataFlow + func (df *DataFlow) POST(url string) *DataFlow + func (df *DataFlow) PUT(url string) *DataFlow + func (df *DataFlow) RequestUse(reqModify ...middler.RequestMiddler) *DataFlow + func (df *DataFlow) ResponseUse(responseModify ...middler.ResponseMiddler) *DataFlow + func (df *DataFlow) SetBasicAuth(username, password string) *DataFlow + func (df *DataFlow) SetBody(obj interface{}) *DataFlow + func (df *DataFlow) SetCookies(c ...*http.Cookie) *DataFlow + func (df *DataFlow) SetForm(obj ...interface{}) *DataFlow + func (df *DataFlow) SetGout(out *Gout) + func (df *DataFlow) SetHeader(obj ...interface{}) *DataFlow + func (df *DataFlow) SetHost(host string) *DataFlow + func (df *DataFlow) SetJSON(obj interface{}) *DataFlow + func (df *DataFlow) SetJSONNotEscape(obj interface{}) *DataFlow + func (df *DataFlow) SetMethod(method string) *DataFlow + func (df *DataFlow) SetProtoBuf(obj interface{}) *DataFlow + func (df *DataFlow) SetProxy(proxyURL string) *DataFlow + func (df *DataFlow) SetQuery(obj ...interface{}) *DataFlow + func (df *DataFlow) SetRequest(req *http.Request) *DataFlow + func (df *DataFlow) SetSOCKS5(addr string) *DataFlow + func (df *DataFlow) SetSetting(s setting.Setting) *DataFlow + func (df *DataFlow) SetTimeout(d time.Duration) *DataFlow + func (df *DataFlow) SetURL(url string) *DataFlow + func (df *DataFlow) SetWWWForm(obj ...interface{}) *DataFlow + func (df *DataFlow) SetXML(obj interface{}) *DataFlow + func (df *DataFlow) SetYAML(obj interface{}) *DataFlow + func (df *DataFlow) UnixSocket(path string) *DataFlow + func (df *DataFlow) WithContext(c context.Context) *DataFlow + type Export interface + Curl func() + type Filter interface + Bench func() Bencher + Retry func() Retry + type Gout struct + func New(c ...*http.Client) *Gout + type NewFilter interface + New func(*DataFlow) interface{} + type Req struct + Err error + func (r *Req) Bind(req *http.Request, resp *http.Response) (err error) + func (r *Req) Client() *http.Client + func (r *Req) Do() (err error) + func (r *Req) GetContext() context.Context + func (r *Req) Request() (req *http.Request, err error) + func (r *Req) Reset() + func (r *Req) Response() (rsp *http.Response, err error) + type Retry interface + Attempt func(attempt int) Retry + Do func() error + Func func(func(c *Context) error) Retry + MaxWaitTime func(maxWaitTime time.Duration) Retry + WaitTime func(waitTime time.Duration) Retry