From ea2bda523f6557e2f1c3c98d9107c525bb6759f7 Mon Sep 17 00:00:00 2001 From: wasupandceacar Date: Tue, 16 Nov 2021 21:36:23 -0500 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20HTTP=20POST=20=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=B1=BB=E5=9E=8B=E4=B8=BA=20json=20(#1168)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/http.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/http.go b/server/http.go index 3b72a7b..3d6f521 100644 --- a/server/http.go +++ b/server/http.go @@ -239,6 +239,7 @@ func (c *HTTPClient) onBotPushEvent(e *coolq.Event) { req, _ := http.NewRequest("POST", c.addr, bytes.NewReader(e.JSONBytes())) req.Header.Set("X-Self-ID", strconv.FormatInt(c.bot.Client.Uin, 10)) req.Header.Set("User-Agent", "CQHttp/4.15.0") + req.Header.Set("Content-Type", "application/json") if c.secret != "" { mac := hmac.New(sha1.New, []byte(c.secret)) _, _ = mac.Write(e.JSONBytes())