Is there any technique available to limit the download/upload rate to some value, e.g. 100kB/s? I was thinking about putting sleep() into some hook or somewhere but didn't find any suitable place to do that.
Because I simply supply a ReadableStream to body
property, my next idea was to slow down the ReadableStream. It should work when uploading stuff but would the same work when downloading data (limit the stream that writes data to disk)? Or the data will start buffering in the memory on GOT side?
In the docs there is this example that says You can create a client that limits download speed, then compose it with an instance that signs a request.
but then the limitDownloadUpload
instance seems to just destroy itself when the size (not the rate) is exceeded. Is the description of the issue invalid or I don't understand something in this example?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too