update
This commit is contained in:
@@ -7,10 +7,11 @@ import (
|
||||
|
||||
type (
|
||||
Config struct {
|
||||
timeout time.Duration
|
||||
client *http.Client
|
||||
transport *http.Transport
|
||||
redirectFn func(req *http.Request, via []*http.Request) error
|
||||
timeout time.Duration
|
||||
client *http.Client
|
||||
transport *http.Transport
|
||||
redirectFn func(req *http.Request, via []*http.Request) error
|
||||
noCheckStatus bool
|
||||
}
|
||||
|
||||
ConfigOpt func(c *Config)
|
||||
@@ -47,3 +48,9 @@ func WithNoRedirect() ConfigOpt {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func WithNoCheckStatus(v bool) ConfigOpt {
|
||||
return func(c *Config) {
|
||||
c.noCheckStatus = v
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user