Documentation
¶
Index ¶
- Constants
- type HttpClient
- func (c *HttpClient) CleanCookie()
- func (c *HttpClient) Get(urlString string, param map[string]string) ([]byte, error)
- func (c *HttpClient) GetCookie() []*fasthttp.Cookie
- func (c *HttpClient) Post(url string, param map[string]interface{}) ([]byte, error)
- func (c *HttpClient) SetClientReadTimeout(duration time.Duration)
- func (c *HttpClient) SetClientWriteTimeout(duration time.Duration)
- func (c *HttpClient) SetCookie(cookieValue map[string]string)
- func (c *HttpClient) SetRequestHeaders(headers map[string]string)
- func (c *HttpClient) SetSkipVerifyTLSConfig(isSkip bool)
- type HttpClientConfig
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient struct {
*fasthttp.Client
//config *HttpClientConfig
Cookie []*fasthttp.Cookie
Headers map[string]string
}
func NewFastClient ¶
func NewFastClient(client *fasthttp.Client) *HttpClient
func (*HttpClient) CleanCookie ¶
func (c *HttpClient) CleanCookie()
func (*HttpClient) GetCookie ¶
func (c *HttpClient) GetCookie() []*fasthttp.Cookie
func (*HttpClient) Post ¶
func (c *HttpClient) Post(url string, param map[string]interface{}) ([]byte, error)
func (*HttpClient) SetClientReadTimeout ¶
func (c *HttpClient) SetClientReadTimeout(duration time.Duration)
func (*HttpClient) SetClientWriteTimeout ¶
func (c *HttpClient) SetClientWriteTimeout(duration time.Duration)
func (*HttpClient) SetCookie ¶
func (c *HttpClient) SetCookie(cookieValue map[string]string)
func (*HttpClient) SetRequestHeaders ¶
func (c *HttpClient) SetRequestHeaders(headers map[string]string)
func (*HttpClient) SetSkipVerifyTLSConfig ¶
func (c *HttpClient) SetSkipVerifyTLSConfig(isSkip bool)
type HttpClientConfig ¶
type HttpClientConfig struct {
Name *string
NoDefaultUserAgentHeader *bool
Dial *fasthttp.DialFunc
DialDualStack *bool
TLSConfig *tls.Config
MaxConnsPerHost *int
MaxIdleConnDuration *time.Duration
MaxConnDuration *time.Duration
MaxIdemponentCallAttempts *int
ReadBufferSize *int
WriteBufferSize *int
ReadTimeout *time.Duration
WriteTimeout *time.Duration
MaxResponseBodySize *int
DisableHeaderNamesNormalizing *bool
DisablePathNormalizing *bool
MaxConnWaitTimeout *time.Duration
RetryIf *fasthttp.RetryIfFunc
ConfigureClient *func(hc *fasthttp.HostClient) error
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.