Closed ghost1372 closed 8 months ago
Hi @bezzad tnx for Great library.
I have an api that requires 2 input for the header, after that if everything goes well the result is a stream that I can save with the following code
HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer"); client.DefaultRequestHeaders.Add("Authorization2", "00"); string url = "https://api.my.com/api/v1/myapi"; HttpResponseMessage response = await client.GetAsync(url); if (response.IsSuccessStatusCode) { Stream stream = await response.Content.ReadAsStreamAsync(); string filename = "file.zip"; using FileStream fileStream = File.Create(filename); await stream.CopyToAsync(fileStream); fileStream.Close(); }
is there any way i can download this file with Downloader library?
Hi @bezzad tnx for Great library.
I have an api that requires 2 input for the header, after that if everything goes well the result is a stream that I can save with the following code
is there any way i can download this file with Downloader library?