VadRsa.Extensions.Http is a collection of Http extensions for added reliability and high-performance I/O.
dotnet add package VadRsa.Extensions.Http
HttpClient.DownloadAsync
is an extension of HttpClient
that reliably downloads files of any size with minimal memory usage.
- Smart chunking, If the server supports the Content-Range header use it to download files in chunks, if not supported fallback to downloading in one chunk.
- Retry chunk/file download.
- Read at your own speed, download as fast as possible. This is done by using producer/consumer pattern under the hood to decouple writes and reads.
HttpClient client = new HttpClient();
client.DownloadAsync("url/to/some/file");