mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-16 21:07:43 +01:00
Add Happy Eyeballs Support (#1187)
This commit is contained in:
parent
2e2ce241e2
commit
6a0b4e5ad7
11 changed files with 271 additions and 18 deletions
|
|
@ -1,7 +1,7 @@
|
|||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Networking.Http;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
using Dalamud.Utility;
|
||||
using Newtonsoft.Json;
|
||||
|
|
@ -42,9 +42,11 @@ internal static class BugBait
|
|||
{
|
||||
model.Exception = Troubleshooting.LastException == null ? "Was included, but none happened" : Troubleshooting.LastException?.ToString();
|
||||
}
|
||||
|
||||
var httpClient = Service<HappyHttpClient>.Get().SharedHttpClient;
|
||||
|
||||
var postContent = new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json");
|
||||
var response = await Util.HttpClient.PostAsync(BugBaitUrl, postContent);
|
||||
var response = await httpClient.PostAsync(BugBaitUrl, postContent);
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue