Closed as not planned
Description
Proposal Details
Proposed new Transport Interceptor Api for net/http package.
It helps users easily install hooks/filters/custom_actions into their Http Client.
A few use cases that I'm using and that I think are useful to a lot of people:
- Block calls to unwanted hosts.
- Add default header for all requests.
- Intercept the Http Request to the destination and send the Mock Http Response to the user. (Useful for Testing)
- Collect complete information about the Request and Response of every Http Request.
- ...
I have written a few typical Interceptors here, you can see it is quite clear so users can easily use and create their Interceptors.