-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
support HttpBody in streaming responses #958
Comments
I think this should be possible with a type assertion in |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still seems like a valuable thing to support. That said, I have not immediate need for it and won't be implementing it. So I guess closing is fine with me 😃 |
@theRealWardo Sorry to bother you. Has this feature already been supported with streaming httpbody? |
I don't think this is supported. |
so my fork does do this - theRealWardo/grpc-gateway@07b39ba...theRealWardo:master disclaimer: its been a while since I tried to rebase that code on top of master so... your mileage may vary with all of this. the custom marshaller I wrote |
Ah cool. Maybe we could add an example to the docs? |
@theRealWardo Do you still work on merging your code to master branch? |
@johanbrandhorst When will an interface param be added to the ContentType() function of Marshal interface so as to fit HttpBody message better. (set the content type with proper grpc response) |
I think the existing httpbody marshaller supports this? https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/marshal_httpbodyproto.go#L29 |
I've confirmed this works as expected |
In
http.proto
, it saysWhat I would like to achive is to have an
rpc MyMethod(Req) (stream HttpBody)
return lines of bare content, like, CSV, or JSON streaming.What we currently get is:
(This was created using that branch)
What would be nice was to get a response like
i.e., the lines of content, unencoded, and not wrapped in
{"result": ... }
The text was updated successfully, but these errors were encountered: