Interceptor defines network-layer customization via a pre/post hook pair. The built-in transport chain always executes between PreRoundTrip and the returned post function, and cannot be skipped or overridden by the extension. PreRoundTrip is called before the built-in chain. Use it to add custom he
| 34 | // a replayable body (e.g. via req.GetBody) before returning, otherwise the |
| 35 | // built-in chain will see an exhausted stream. |
| 36 | type Interceptor interface { |
| 37 | PreRoundTrip(req *http.Request) func(resp *http.Response, err error) |
| 38 | } |
| 39 | |
| 40 | // AbortableInterceptor is an optional extension of Interceptor that lets an |
| 41 | // extension reject a request before the built-in chain runs. Extensions that |
no outgoing calls
no test coverage detected