mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
Replace WebClient with HttpClient
This commit is contained in:
parent
d23ed9020a
commit
965f2142ff
2 changed files with 9 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Logging.Internal;
|
||||
|
|
@ -74,11 +74,10 @@ namespace Dalamud.Plugin.Internal
|
|||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
using var client = new WebClient();
|
||||
|
||||
Log.Information($"Fetching repo: {this.PluginMasterUrl}");
|
||||
|
||||
var data = client.DownloadString(this.PluginMasterUrl);
|
||||
using var client = new HttpClient();
|
||||
using var response = client.GetAsync(this.PluginMasterUrl).Result;
|
||||
var data = response.Content.ReadAsStringAsync().Result;
|
||||
|
||||
var pluginMaster = JsonConvert.DeserializeObject<List<RemotePluginManifest>>(data);
|
||||
pluginMaster.Sort((pm1, pm2) => pm1.Name.CompareTo(pm2.Name));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue