/ go Public
proposal: net/http: add
Middleware for server & client
Middlewarefor server & client #38479
net/http, for server side, we have
HandlerFuncis the convenient way for user to define new handler, but in client side, we only have
RoundTripper, so I proposal to add
With this new type, we can easily implement
In modern web application, middleware pattern is widely used. With
Middlewarewe can add more action before/after handler/request call.
For the server side, we can define
For the client side, we define
All the above are not necessary, but can reduce and simplify user's boilerplate code.
Please consider this proposal.
The original code is middleware, interceptor & RoundTripperFunc
The text was updated successfully, but these errors were encountered: