Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient
重用 Client
https://req.cool/zh/docs/tutorial/best-practices/#%e9%87%8d%e7%94%a8-client
PS: (1) 不要每次发请求都创建 Client,造成不必要的开销,通常可以复用同一 Client 发所有请求.
func NewRequest ¶
func NewRequest(client *req.Client) (r *req.Request)
NewRequest
@param client 可以为nil,将采用 defClient
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.