bezzad / Downloader

Fast, cross-platform and reliable multipart downloader with asynchronous progress events for .NET applications.
MIT License
1.25k stars 193 forks source link

Inquiry Regarding Repository Usage for Efficient Download of Small Files in .NET #158

Open zydjohnHotmail opened 6 months ago

zydjohnHotmail commented 6 months ago

I hope this message finds you well. I am writing to inquire about the suitability of your GitHub repository for a specific use case.

I am interested in using your repository to download multiple small files concurrently. The files I need to download are relatively small, ranging from 2KB to 5.6KB. I anticipate having up to 50 URLs, though typically no more than 15. The frequency of downloads varies throughout the day, with some periods having only 1 or 2 URLs, and occasionally none at all.

The URLs resemble the following examples: http://worldtimeapi.org/Europe/London http://worldtimeapi.org/Europe/Berlin ......

These URLs represent endpoints that provide JSON data, and I need to download them quickly and efficiently. I plan to implement this functionality in C# using .NET 8.0 and Visual Studio 2022 on Windows 10.

Could you kindly confirm if your repository supports this use case? Additionally, if it does, I would greatly appreciate some general instructions on how to effectively leverage your repository for this purpose.

Thank you for your time and assistance. I look forward to your guidance.

bezzad commented 5 months ago

@zydjohnHotmail Hi, First of all, I apologize for the delay in replying. For your use, I suggest you use the HttpClient of .Net library instead of the Downloader.

var client = new HttpClient();
string url = "http://worldtimeapi.org/Europe/London";
YourModel response = await client.GetFromJsonAsync<YourModel>(url);