grpc / grpc/grpc-web

Add progress hook

Open
#999 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
802
Avg merge
1d 7h
Merged PRs (30d)
5

Description

Hey!

Currently there is no way to tell if the request that I initiated is in progress of receiving any data or is just hanging. That is especially true for RPC calls with big response payloads.

We'd like to support in our system client side timeouts for RPC calls/streams that haven't observed any data in X amount of time. Currently the only way to do it seems to be wait for the RPC to complete and then stop the timeout signal. However if the payload is big it is very likely that before receiving the full response the timeout would fire off. Instead, we'd like to have a timeout reset each time a new chunk of data is downloaded - that's a far better solution.
To do that it'd be useful to be able to register a progress callback, but because the underlaying XHR (or fetch in future) is not exposed for obvious reasons, it's hard to get a handle on progress.

I'm happy to submit a PR adding additional progress callback but before I do that I'd like to hear opinions and if this concept would be accepted in the first place.

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.