mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
[Utilities] Remove unnecessary overload DownloadString method
This commit is contained in:
parent
e26af6ddb0
commit
587b735c53
@ -298,21 +298,12 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
/// </summary>
|
||||
/// <param name="address">A <see cref="String"/> containing the URI to download.</param>
|
||||
/// <returns>A <see cref="String"/> containing the requested resource.</returns>
|
||||
public static string DownloadString(string address)
|
||||
public static string DownloadString(string address, Encoding encoding = null)
|
||||
{
|
||||
using (var wc = new WebClient())
|
||||
{
|
||||
wc.Proxy = GetProxy();
|
||||
return wc.DownloadString(address).Trim();
|
||||
}
|
||||
}
|
||||
|
||||
public static string DownloadString(string address, Encoding encoding)
|
||||
{
|
||||
using (var wc = new WebClient())
|
||||
{
|
||||
wc.Proxy = GetProxy();
|
||||
wc.Encoding = encoding;
|
||||
wc.Encoding = encoding ?? encoding;
|
||||
return wc.DownloadString(address).Trim();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user