Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zydjohnHotmail opened this issue Dec 20, 2023 · 1 comment

Comments

@zydjohnHotmail
Copy link

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
Copy link
Owner

bezzad commented Jan 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants