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

Proposal: Support for grpc-web #2227

Open
CosminSontu opened this issue Jan 21, 2024 · 8 comments
Open

Proposal: Support for grpc-web #2227

CosminSontu opened this issue Jan 21, 2024 · 8 comments

Comments

@CosminSontu
Copy link

Currently htmx supports AJAX, WebSockets, SSE, but not grpc-web.

I think that would be very useful.
I also think it's possible to use grpc-web using some kind of event-based workaround, but it would be great to have first-class support.

I apologize if there's already an issue on grpc-web or a documented way to do grpc-web with htmx, I just did not find it.

Cheers!

@saadansari93
Copy link

+1

@bshore
Copy link

bshore commented Jan 25, 2024

https://htmx.org/extensions/#defining

It could be done through extending htmx , it would probably have to be extended anyway in order to serialize/deserialize any grpc messages.

I could be wrong but grpc and protocol buffers requiring serialization/deserialization don't seem to fit the vision of hypermedia?

@CosminSontu
Copy link
Author

I could be wrong but grpc and protocol buffers requiring serialization/deserialization don't seem to fit the vision of hypermedia?

It's true, but same can be said about WebSockets for example. Should be ok as long as it serves html.

@loeffel-io
Copy link

+1

@vildan-valeev
Copy link

vildan-valeev commented Feb 13, 2024

Hi everyone. I'm trying to create example using gRPC and htmx
extension, but don't know how I can paste my response from backend into DOM (here).

My knowledge of Javascript is not sufficient to complete this example. Help pls)).

@vildan-valeev
Copy link

Upd: I received string(html) from gRPC,and call selectAndSwap method from htmx.js api. And it's work!

@struckoff
Copy link

+1

@fadhilaf
Copy link

ahh.. i was just thinking this and it would be the new standard XD

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

7 participants