rpc-codec
rpc-codec copied to clipboard
Middleware support
Does the project have the support of middlewares? So if not - I can implement it. Now I can just wrap around ServeHTTP function, but sometimes I wanna choose a group to wrap it.
You can add your middlewares by wrapping jsonrpc2.HTTPHandler, like this:
http.Handle("/rpc", yourMiddleware1(yourMiddleware2(jsonrpc2.HTTPHandler(nil))))
Can you please explain what else do you need?
For example, I have 10 handlers and I need to wrap only 5. This way won't work.
I don't understand what you mean and how it may not work. You may explain in Russian if you like to.