Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering requests / responses (postMessage) as callable API #54

Open
smnbbrv opened this issue Nov 14, 2019 · 1 comment
Open

Registering requests / responses (postMessage) as callable API #54

smnbbrv opened this issue Nov 14, 2019 · 1 comment

Comments

@smnbbrv
Copy link

smnbbrv commented Nov 14, 2019

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

window.postMessage({

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?

@rogchap
Copy link
Contributor

rogchap commented Dec 6, 2019

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 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants