grpc-web
grpc-web copied to clipboard
unary (grpcweb binary) grpc-web over http3 - no response body
Hi,
I wanted to use h/3 as the transfer protocol, but grpc-web isn't extracting the response body for some reason - normal fetch seems to work.
Did you encounter this sort of issue?
Thanks for the question.
Do you mind providing some details on how exactly are you specifying http/3 to be used? thanks :)
Hi,
Sure!
I have an envoy proxy server with a configuration similar to https://baptistout.net/posts/upgrade-envoy-http3/
You can see the request/response headers etc in the below example request

Hi - I think I can see what the issue is, the response becomes a streaming response on the protocol level, but for an unary request there is no support for partial XMLHttpRequest processing. Using the fetch api here would be much more convenient imho.
Where can I find the grpc-web client (https://www.npmjs.com/package/grpc-web) in an uncompiled/unobscufated form?
I'll try to use grpc-web-text with the streaming interface and report back - but binary streaming would be super nice to have.
Figured it out - the XHR Request being used, doesn't support streaming (d'oh). 2 solutions are possible:
- Either set an explicit "Connection: close" header in your envoy proxy (which defeats the idea of streaming req/resp)
- Use grpc-web for everything up to request creation, but use your own wrapper for actually making the request (a nice guide on streaming requests can be found here https://developer.chrome.com/articles/fetch-streaming-requests/)