Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IsTimeoutError func(err error) (flag bool) = httpClientKit.IsTimeoutError
IsTimeoutError 是否是请求超时错误?
Functions ¶
func DownloadToFile ¶
func GetDefaultClient ¶
func GetDefaultClient() *req.Client
GetDefaultClient
重用Client https://req.cool/zh/docs/tutorial/best-practices/#%e9%87%8d%e7%94%a8-client
不要每次发请求都创建 Client,造成不必要的开销,通常可以复用同一 Client 发所有请求.
!!!: 不修改返回值的话,可以调用此方法;否则调用 NewClient.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.