Documentation ¶
Index ¶
- type ClientPool
- func (cp *ClientPool) Delete(url string, data interface{}, headers ...string) *Result
- func (cp *ClientPool) Destroy()
- func (cp *ClientPool) Do(method, url string, data interface{}, headers ...string) *Result
- func (cp *ClientPool) DoByRequest(request *http.Request, method, url string, data interface{}, ...) *Result
- func (cp *ClientPool) Download(filename, url string, ...) (*Result, error)
- func (cp *ClientPool) EnableRedirect()
- func (cp *ClientPool) Get(url string, headers ...string) *Result
- func (cp *ClientPool) Head(url string, headers ...string) *Result
- func (cp *ClientPool) MPost(url string, formData map[string]string, files map[string]interface{}, ...) (*Result, []error)
- func (cp *ClientPool) ManualDo(method, url string, data interface{}, headers ...string) *Result
- func (cp *ClientPool) ManualDoByRequest(request *http.Request, method, url string, data interface{}, ...) *Result
- func (cp *ClientPool) Post(url string, data interface{}, headers ...string) *Result
- func (cp *ClientPool) Put(url string, data interface{}, headers ...string) *Result
- func (cp *ClientPool) SetGlobalHeader(k, v string)
- type Form
- type Range
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientPool ¶
type ClientPool struct { GlobalHeaders map[string]string NoBody bool Debug bool DownloadPartSize int64 // contains filtered or unexported fields }
func GetClient ¶
func GetClient(timeout time.Duration) *ClientPool
func GetClientH2C ¶
func GetClientH2C(timeout time.Duration) *ClientPool
func (*ClientPool) Delete ¶
func (cp *ClientPool) Delete(url string, data interface{}, headers ...string) *Result
func (*ClientPool) Destroy ¶ added in v1.7.8
func (cp *ClientPool) Destroy()
func (*ClientPool) Do ¶
func (cp *ClientPool) Do(method, url string, data interface{}, headers ...string) *Result
func (*ClientPool) DoByRequest ¶
func (*ClientPool) EnableRedirect ¶
func (cp *ClientPool) EnableRedirect()
func (*ClientPool) ManualDo ¶ added in v0.6.11
func (cp *ClientPool) ManualDo(method, url string, data interface{}, headers ...string) *Result
func (*ClientPool) ManualDoByRequest ¶ added in v1.7.5
func (*ClientPool) Post ¶
func (cp *ClientPool) Post(url string, data interface{}, headers ...string) *Result
func (*ClientPool) Put ¶
func (cp *ClientPool) Put(url string, data interface{}, headers ...string) *Result
func (*ClientPool) SetGlobalHeader ¶
func (cp *ClientPool) SetGlobalHeader(k, v string)
Click to show internal directories.
Click to hide internal directories.