mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: specify application/json content-type in dispatch requests
This commit is contained in:
parent
28a199e507
commit
ddd966ad58
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue