OpenBve.Internet.DownloadBytesFromUrl C# (CSharp) Method

DownloadBytesFromUrl() static private method

Downloads data from the specified URL.
static private DownloadBytesFromUrl ( string url ) : byte[]
url string The URL.
return byte[]
        internal static byte[] DownloadBytesFromUrl(string url)
        {
            byte[] bytes;
            using (WebClient client = new WebClient()) {
                AddWebClientHeaders(client, url);
                bytes = client.DownloadData(url);
            }
            return bytes;
        }