Registering requests / responses (postMessage) as callable API
smnbbrv opened this issue · comments
Hi @rogchap
I work on a custom gRPC code generator plugin and due to a different data structure I have problems connecting it to this amazing extension. My idea is to have the interceptor which would simply push the messages via your API.
That's why I'd love to have this (and similar for streaming) calls
as some sort of fixed API.
Of course I can call postMessage directly and use your data structure, but, as long as it is not anyhow documented I am unsure of its stability.
This by the way could potentially solve this issue #35 as well. The RPC calls there are done in a worker thread, however they could simply post the messages to the window and redirect them there to your API.
Would this be possible?
Hey @smnbbrv thanks for the suggestion; sorry it took me so long to get to this.
When I wrote this extension I wanted to use client interceptors (hence why I wrote the proposal on gRPC-web); so without it I had to “hook-in” by overriding the generated API.
I’ll take a closer look at your Angular fix/PR and see what we can do. Not sure when, so if you happen to submit a PR, I’m more than happy to review 😃