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

Feature Request: Server streams for general REST APIs #161

Open
devnev opened this issue Feb 25, 2025 · 1 comment
Open

Feature Request: Server streams for general REST APIs #161

devnev opened this issue Feb 25, 2025 · 1 comment

Comments

@devnev
Copy link

devnev commented Feb 25, 2025

I've tried using vanguard-go as it seemed appealing to get all of REST, connect and grpc in one go. However, when I got to a streaming API the REST variant gave an error indicating that it is unsupported. It looks like from the implementation that only HttpBody responses can be streamed. So in the end I've gone back to connectrpc+(grpcgateway+grpchan) which has reminded me while vanguard-go seemed so appealing in the first place 😁 ...

Are there any plans for supporting arbitrary response stream types?

I understand there's a bunch of concerns, in particular how to send the final status - e.g. trailers are still very, very far from being supported by browsers to a degree that would make them suitable for the response status. Content-type negotation might be a passable way to get around these, i.e. the client has to opt in to a certain way of streaming responses by having a particular protocol version in its accept header.

@emcfarlane
Copy link
Collaborator

emcfarlane commented Feb 28, 2025

Hi devnev, theres not currently a well defined spec for how streaming RPCs map to REST style requests. There is support for file streaming with the use of google.api.HttpBody. Streaming implementation usually want to use something like websockets or the new WebTransport (HTTP3) but this is very project specific. So to support streaming I think we'd want to provide pluggable protocols to allow users to change the client encoder to fit their use case. However, there is no planned support for this.

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