viz icon indicating copy to clipboard operation
viz copied to clipboard

RPC

Open fundon opened this issue 2 years ago • 7 comments

fundon avatar Jan 11 '23 04:01 fundon

is it possible to make interface like here? https://github.com/kardeiz/jsonrpc-v2 also need support of middlewares for rpc what do you think about it?

mymtw avatar May 29 '24 22:05 mymtw

Should integrate well with jsonrpc-v2. But needs to be adapted to hyper v1.

fundon avatar May 30 '24 00:05 fundon

this lib https://github.com/kardeiz/jsonrpc-v2 not allowing to add and use middlewares e.g. for jwt auth.

mymtw avatar May 30 '24 00:05 mymtw

jsonrpc supports to convert it into hyper service. So it is possible to use middleware from other frameworks.

https://github.com/kardeiz/jsonrpc-v2/blob/16ec062ec3e9f83f95458bbb5e5bc6a599adbf75/examples/hyper.rs#L38

fundon avatar May 30 '24 00:05 fundon

sorry for such questions but i really dont know how to use them when we asked creator of lib to add support of middlewares. He added PR, but didn't merge it
https://github.com/kardeiz/jsonrpc-v2/pull/23

mymtw avatar May 30 '24 00:05 mymtw

In jsonrpc, there are some examples about actix. You can follow actix's middleware guide.

fundon avatar May 30 '24 00:05 fundon

ok thank you

mymtw avatar May 30 '24 00:05 mymtw