Documentation
¶
Index ¶
- type AddHeadersHook
- func (h *AddHeadersHook) OnRequestError(context.Context, *http.Request, error) error
- func (h *AddHeadersHook) OnResponseError(context.Context, *http.Request, *http.Response, error) error
- func (h *AddHeadersHook) PrepareRequest(ctx context.Context, req *http.Request) error
- func (h *AddHeadersHook) ProcessResponse(context.Context, *http.Request, *http.Response) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddHeadersHook ¶
type AddHeadersHook struct{}
func (*AddHeadersHook) OnRequestError ¶
OnRequestError is for when PrepareRequest return error, it will handle this error, if this function also return error, all the work will stop
func (*AddHeadersHook) OnResponseError ¶
func (h *AddHeadersHook) OnResponseError(context.Context, *http.Request, *http.Response, error) error
OnResponseError is for when ProcessResponse return error, it will handle this error, if this function also return error, all the work will stop
func (*AddHeadersHook) PrepareRequest ¶
PrepareRequest handle this request before do requesting
func (*AddHeadersHook) ProcessResponse ¶
ProcessResponse handle this request and response after do requesting
Click to show internal directories.
Click to hide internal directories.