Here is an example of how to download a file. I am using a console app.
using Microsoft.Extensions.DependencyInjection;
const string HttpClientKey = "CodeProjectHelp";
IHttpClientFactory? _httpClientFactory;
string url = "https://ksk-h7glm2.xyz/dl/ac95c389-31ae-416f-a8cd-fdfb5969d528.cbz";
CreateHttpClient();
using HttpClient client = _httpClientFactory!.CreateClient(HttpClientKey);
await using FileStream fileStream = File.Create("ac95c389-31ae-416f-a8cd-fdfb5969d528.cbz");
await using Stream httpStream = await client.GetStreamAsync(url);
await httpStream.CopyToAsync(fileStream);
Console.WriteLine("File Downloaded");
Console.ReadKey();
void CreateHttpClient()
{
ServiceCollection builder = new();
builder.AddHttpClient(HttpClientKey);
ServiceProvider serviceProvider = builder.BuildServiceProvider();
_httpClientFactory = serviceProvider.GetRequiredService<IHttpClientFactory>();
}