Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestMiddler ¶
func WithRequestMiddlerFunc ¶
func WithRequestMiddlerFunc(f RequestMiddlerFunc) RequestMiddler
WithRequestMiddlerFunc 是创建一个 RequestMiddler 的helper 如果我们只需要简单的逻辑,只关注闭包本身,则可以使用这个helper快速创建一个 RequestMiddler
type RequestMiddlerFunc ¶
func (RequestMiddlerFunc) ModifyRequest ¶
func (f RequestMiddlerFunc) ModifyRequest(req *http.Request) error
type ResponseMiddler ¶
ResponseMiddler 响应拦截器
func WithResponseMiddlerFunc ¶
func WithResponseMiddlerFunc(f ResponseMiddlerFunc) ResponseMiddler
WithResponseMiddlerFunc 是创建一个 ResponseMiddler 的helper 如果我们只需要简单的逻辑,只关注闭包本身,则可以使用这个helper快速创建一个 ResponseMiddler
type ResponseMiddlerFunc ¶
func (ResponseMiddlerFunc) ModifyResponse ¶
func (f ResponseMiddlerFunc) ModifyResponse(response *http.Response) error
Click to show internal directories.
Click to hide internal directories.