Documentation
¶
Index ¶
- Constants
- type HertzHttpClient
- func (HertzHttpClient) CheckRetry(err error, status int) bool
- func (hhc HertzHttpClient) Exec(req *request.Request) (r *gResp.Response, err error)
- func (hhc HertzHttpClient) Proxy(targetUrl string, ctx *app.RequestContext, timeout time.Duration) error
- func (hhc *HertzHttpClient) SetClient(c *client.Client)
Constants ¶
View Source
const ( DefaultTimeout = 10 * time.Second ContentType = "Content-Type" RequestTimeOut = 5 * time.Minute WriteTimeout = RequestTimeOut )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HertzHttpClient ¶
type HertzHttpClient struct {
// contains filtered or unexported fields
}
func GetDefaultClient ¶
func GetDefaultClient() HertzHttpClient
func (HertzHttpClient) CheckRetry ¶
func (HertzHttpClient) CheckRetry(err error, status int) bool
func (HertzHttpClient) Proxy ¶
func (hhc HertzHttpClient) Proxy(targetUrl string, ctx *app.RequestContext, timeout time.Duration) error
func (*HertzHttpClient) SetClient ¶
func (hhc *HertzHttpClient) SetClient(c *client.Client)
Click to show internal directories.
Click to hide internal directories.