From ddd966ad58617cb44aa27f0f9c185ad7850e32d5 Mon Sep 17 00:00:00 2001 From: spiral Date: Fri, 26 Nov 2021 12:56:32 -0500 Subject: [PATCH] fix: specify application/json content-type in dispatch requests --- PluralKit.Core/Dispatch/DispatchModels.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Core/Dispatch/DispatchModels.cs b/PluralKit.Core/Dispatch/DispatchModels.cs index e6ddeae3..30977eef 100644 --- a/PluralKit.Core/Dispatch/DispatchModels.cs +++ b/PluralKit.Core/Dispatch/DispatchModels.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Net; using System.Net.Http; using System.Net.Sockets; +using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; @@ -59,7 +60,7 @@ namespace PluralKit.Core o.Add("guild_id", data.GuildId.ToString()); o.Add("data", data.EventData); - return new StringContent(JsonConvert.SerializeObject(o)); + return new StringContent(JsonConvert.SerializeObject(o), Encoding.UTF8, "application/json"); } public static JObject ToDispatchJson(this PKMessage msg, string memberRef)