How do I download a CSV file from a web server to a local machine using HTTP? [duplicate]
How do I download a CSV file from a web server to a local machine using HTTP?
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);
}
精彩评论