This commit is contained in:
laodaming 2023-11-07 13:01:25 +08:00
parent 1ef3b816a7
commit 83c92deda4

View File

@ -10,7 +10,7 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"io" "io/ioutil"
"net/http" "net/http"
"strings" "strings"
@ -53,7 +53,7 @@ type BaseWebhookMsgHeaderType struct {
} }
func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) { func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
bodyBytes, err := io.ReadAll(r.Body) bodyBytes, err := ioutil.ReadAll(r.Body)
if err != nil { if err != nil {
logx.Error("读取请求body失败", err) logx.Error("读取请求body失败", err)
return return