Downloader icon indicating copy to clipboard operation
Downloader copied to clipboard

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

Open zydjohnHotmail opened this issue 2 years ago • 2 comments

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.

zydjohnHotmail avatar Dec 20 '23 20:12 zydjohnHotmail

@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);

bezzad avatar Jan 02 '24 20:01 bezzad