From c8dcf8e88461ff1c16c639c0833937b1a4121eee Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Thu, 5 Mar 2026 01:00:47 -0600 Subject: [PATCH] Choking without an accept header --- KfChatDotNetBot/Services/Shuffle.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Services/Shuffle.cs b/KfChatDotNetBot/Services/Shuffle.cs index e1a06a1..635704b 100644 --- a/KfChatDotNetBot/Services/Shuffle.cs +++ b/KfChatDotNetBot/Services/Shuffle.cs @@ -1,4 +1,5 @@ using System.Net; +using System.Net.Http.Headers; using System.Net.Http.Json; using System.Net.WebSockets; using System.Text.Json; @@ -183,8 +184,9 @@ public class Shuffle : IDisposable handler.Proxy = new WebProxy(_proxy); _logger.Debug($"Configured to use proxy {_proxy}"); } - using var client = new HttpClient(handler); + client.DefaultRequestHeaders.Accept.Clear(); + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/graphql-response+json,application/json;q=0.9")); var postBody = JsonContent.Create(jsonBody); var response = await client.PostAsync("https://shuffle.com/main-api/graphql/api/graphql", postBody, _cancellationToken); var responseContent = await response.Content.ReadFromJsonAsync(cancellationToken: _cancellationToken);