Documentation
¶
Index ¶
- type ClientPool
- func (cp *ClientPool) Delete(url string, data interface{}, headers ...string) *Result
- 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) EnableRedirect()
- func (cp *ClientPool) Get(url string, headers ...string) *Result
- func (cp *ClientPool) Head(url string, data interface{}, headers ...string) *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 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
// 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) 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) Head ¶
func (cp *ClientPool) Head(url string, data interface{}, headers ...string) *Result
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.