3 ms·
I previously worked on an embedded device with a JSON/RPC over WebSockets API. I needed to use the API from a web browser context. There is not so much tooling
by roywashere 4y ago
I previously worked on an embedded device with a JSON/RPC over WebSockets API. I needed to use the API from a web browser context.
There is not so much tooling for JSON/RPC in general. But it is very simple. I wrote my own client library wrapper that did the connection handling and request/response mapping. You'll probably want to do something like that to be able to handle requests that take a long time, that need to be retried, to re-open closed websockets for some reason or such. But if you have that, it's OK.
I was not aware of the open-rpc 'schema' stuff, that looks very interesting, simple and useful