This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void DownloadFile(string urlAddress, string location) | |
{ | |
using (WebClient client = new WebClient()) | |
{ | |
Uri uri = new Uri(urlAddress); | |
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged); | |
client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted); | |
client.DownloadFileAsync(uri, location); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; //NuGet Newtonsoft.Json | |
using RestSharp; //NuGet RestSharp | |
using System; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Reflection; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace [ YOUR PROJECT NAMESPACE ] |