I'm trying to download a .csv file off Etsy and I'm not sure why it's not working to just write
StreamReader reader = new StreamReader(WebRequest.Create("https://www.etsy.com/se-en/your/orders/sold.csv?csv-type=transaction-level&month=&year=2016").GetResponse().GetResponseStream());
string line;
while ((line = reader.ReadLine()) != null)
{
Console.WriteLine(line);
}
Or just
StreamReader reader = new StreamReader(WebRequest.Create("https://www.etsy.com/se-en/your/orders/sold.csv").GetResponse().GetResponseStream());
string line;
while ((line = reader.ReadLine()) != null)
{
Console.WriteLine(line);
}
I also tried using
using (var client = new WebClient())
{
client.Credentials = new NetworkCredential("login", "password");
client.DownloadFile("https://www.etsy.com/se-en/your/orders/sold.csv", @"c:\sold.csv");
}
But it keeps giving me http instead.