Versions in this module Expand all Collapse all v2 v2.0.0 Apr 17, 2020 Changes in this version + const DELETE + const GET + const HEAD + const OPTIONS + const PATCH + const POST + const PUT + const TypeForm + const TypeFormData + const TypeHTML + const TypeJSON + const TypeMultipart + const TypeStream + const TypeText + const TypeUrlencoded + const TypeXML + var DisableTransportSwap = false + var Types = map[string]string + type Agent interface + AddCookie func(c *http.Cookie) Agent + AddCookies func(cookies []*http.Cookie) Agent + AddHeader func(param string, value string) Agent + AddParam func(key string, value string) Agent + AddSimpleCookie func(name, val string) Agent + AsCurlCommand func() (string, error) + Asynch func() Agent + Clone func() Agent + Curl func() Agent + Debug func() Agent + Delete func(targetUrl string, a ...interface{}) Receiver + Get func(targetUrl string, a ...interface{}) Receiver + Head func(targetUrl string, a ...interface{}) Receiver + Http func(method, targetUrl string, a ...interface{}) Receiver + Options func(targetUrl string, a ...interface{}) Receiver + Patch func(targetUrl string, a ...interface{}) Receiver + Post func(targetUrl string, a ...interface{}) Receiver + Proxy func(proxyUrl string) Agent + Put func(targetUrl string, a ...interface{}) Receiver + Query func(content interface{}) Agent + RedirectPolicy func(policy func(req *http.Request, via []*http.Request) error) Agent + Retry func(retryerCount int, retryerTime time.Duration, statusCode ...int) Agent + Send func(content interface{}) Agent + SendFile func(file interface{}, args ...string) Agent + SendMap func(content interface{}) Agent + SendSlice func(content []interface{}) Agent + SendString func(content string) Agent + SendStruct func(content interface{}) Agent + SetBasicAuth func(username string, password string) Agent + SetDoNotClearSuperAgent func(enable bool) Agent + SetHeader func(param string, value string) Agent + TLSClientConfig func(config *tls.Config) Agent + Timeout func(timeout time.Duration) Agent + Type func(typeStr string) Agent + func New() Agent + type Receiver interface + Await func() Receiver + BodyCompile func(pattern string) []string + BodyUnmarshal func(v interface{}) error + Error func() error + Errors func() []error + GetBody func() []byte + GetBodyString func() string + GetResponse func() *http.Response + GetStatus func() int + Save func(fl interface{}) error + Stop func() + Then func(fn func(r Receiver)) Receiver + type SuperAgent struct + BasicAuth struct{ ... } + BounceToRawString bool + Client *http.Client + Cookies []*http.Cookie + Data map[string]interface{} + DoNotClearSuperAgent bool + Errors []error + FileData []SuperFile + ForceType string + Header http.Header + Method string + QueryData url.Values + RawString string + Retryable superAgentRetryable + SliceData []interface{} + TargetType string + Transport *http.Transport + Url string + func (s *SuperAgent) AddCookie(c *http.Cookie) Agent + func (s *SuperAgent) AddCookies(cookies []*http.Cookie) Agent + func (s *SuperAgent) AddHeader(param string, value string) Agent + func (s *SuperAgent) AddParam(key string, value string) Agent + func (s *SuperAgent) AddSimpleCookie(name, val string) Agent + func (s *SuperAgent) AsCurlCommand() (string, error) + func (s *SuperAgent) Asynch() Agent + func (s *SuperAgent) Clone() Agent + func (s *SuperAgent) Curl() Agent + func (s *SuperAgent) Debug() Agent + func (s *SuperAgent) Delete(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Get(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Head(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Http(method, targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Options(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Patch(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Post(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Proxy(proxyUrl string) Agent + func (s *SuperAgent) Put(targetUrl string, a ...interface{}) Receiver + func (s *SuperAgent) Query(content interface{}) Agent + func (s *SuperAgent) RedirectPolicy(policy func(req *http.Request, via []*http.Request) error) Agent + func (s *SuperAgent) Retry(retryerCount int, retryerTime time.Duration, statusCode ...int) Agent + func (s *SuperAgent) Send(content interface{}) Agent + func (s *SuperAgent) SendFile(file interface{}, args ...string) Agent + func (s *SuperAgent) SendMap(content interface{}) Agent + func (s *SuperAgent) SendSlice(content []interface{}) Agent + func (s *SuperAgent) SendString(content string) Agent + func (s *SuperAgent) SendStruct(content interface{}) Agent + func (s *SuperAgent) SetBasicAuth(username string, password string) Agent + func (s *SuperAgent) SetDoNotClearSuperAgent(enable bool) Agent + func (s *SuperAgent) SetHeader(param string, value string) Agent + func (s *SuperAgent) TLSClientConfig(config *tls.Config) Agent + func (s *SuperAgent) Timeout(timeout time.Duration) Agent + func (s *SuperAgent) Type(typeStr string) Agent + type SuperFile struct + Data []byte + Fieldname string + Filename string + type SuperReceiver struct + Body []byte + Errs []error + Resp *http.Response + func (r *SuperReceiver) GetStatus() int + func (s *SuperReceiver) Await() Receiver + func (s *SuperReceiver) BodyCompile(pattern string) []string + func (s *SuperReceiver) BodyUnmarshal(v interface{}) error + func (s *SuperReceiver) Error() error + func (s *SuperReceiver) Errors() []error + func (s *SuperReceiver) GetBody() []byte + func (s *SuperReceiver) GetBodyString() string + func (s *SuperReceiver) GetResponse() *http.Response + func (s *SuperReceiver) Save(fl interface{}) error + func (s *SuperReceiver) Stop() + func (s *SuperReceiver) Then(fn func(r Receiver)) Receiver Other modules containing this package github.com/lhlyu/request