I have this question and I am not able to figure it out.
The application should provide a bulk download facility as follows. The user should be able specify a file name, default setting bulk.txt, containing URLs (exactly one per line).
When initiating bulk download, the application should retrieve each of the pages listed in the file, and display the results as a list of lines as follows: code bytes URL
where code should be the response status code from the page retrieval, bytes should be the number of bytes retrieved from this URL, and URL should be the URL as specified in the bulk download file.
These results should be shown in a textarea.
What I have tried:
I have manged to do this but I don't think I know how to display it.
Bulk.txt has 5 lines of text with some website URL's
private async void button2_Click(object sender, EventArgs e)
string path = "C:bulk.txt";
StreamReader stream = new StreamReader(path);
string mydata = stream.ReadToEnd();
label1.Text = mydata.ToString();
using (var client = new HttpClient())
using (HttpResponseMessage response = await client.GetAsync("https://www.google.com"))
byte fileContents = await response.Content.ReadAsByteArrayAsync();
richTextBox1.Text = fileContents.ToString();