Biz.Services.DownloadService.DownloadFromPath C# (CSharp) Method

DownloadFromPath() public method

public DownloadFromPath ( Uri url ) : string
url System.Uri
return string
        public string DownloadFromPath(Uri url)
        {
            string courseContent = string.Empty;
            WebClient c = new WebClient();
            c.Headers.Add("Content-Type", "application/json; charset=utf-8");

            try
            {
                courseContent = c.DownloadString(url);
            }
            catch (WebException ex)
            {
                Logger.Write(url.ToString() + "\r\n" + ex);
            }

            return courseContent;
        }

Same methods

DownloadService::DownloadFromPath ( Uri url, string path ) : string