How do I download a CSV file from a web server to a local machine using HTTP?
Asked
Active
Viewed 2,786 times
1 Answers
4
Download file using WebClient:
string url = "urlToFile";
using (var client = new WebClient())
using(var file = File.Create("someFile.ext"))
{
var bytes = client.DownloadData(uri);
file.Write(bytes, 0, bytes.Length);
}

Andrew Orsich
- 52,935
- 16
- 139
- 134