| 123456789101112131415161718192021 |
- using LauncherUpdater.Function;
- using System.Net.Http;
- using System.Threading.Tasks;
- namespace LauncherUpdater.HTTP
- {
- public class HttpRequest
- {
- private string CheckLauncherVersion =
- Configuration.Default.ServerIP + Configuration.Default.CheckLauncherVersion;
- public async Task<string> GetLauncherFileAsync()
- {
- string launcherFileAsync;
- using (HttpClient client = new HttpClient())
- launcherFileAsync =
- await (await client.GetAsync(this.CheckLauncherVersion)).Content.ReadAsStringAsync();
- return launcherFileAsync;
- }
- }
- }
|