Implement metadata and httpRequest in the windows launcher. Untested.

This commit is contained in:
Paul Chote
2010-12-24 12:13:28 +13:00
parent 6ff0e41650
commit b5b6b47e95

View File

@@ -6,6 +6,7 @@ using System.IO;
using System.Diagnostics;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Net;
namespace OpenRA.Launcher
{
@@ -148,5 +149,20 @@ namespace OpenRA.Launcher
return true;
}
public string metadata(string field, string mod)
{
if (field == "VERSION")
return allMods[mod].Version;
return "";
}
public string httpRequest(string url)
{
var wc = new WebClient();
var data = wc.DownloadData(new Uri(url));
return Encoding.UTF8.GetString(data);
}
}
}