This commit is contained in:
laodaming 2023-11-06 17:26:53 +08:00
parent 92423be010
commit 64ec884b88

View File

@ -2,6 +2,7 @@ package handler
import ( import (
"encoding/json" "encoding/json"
"io"
"log" "log"
"net/http" "net/http"
"reflect" "reflect"
@ -30,7 +31,10 @@ func WebhookHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
w.Write(b) w.Write(b)
return return
} }
log.Println("收到消息:", r.Header) b, _ := io.ReadAll(r.Body)
defer r.Body.Close()
log.Println("收到头消息:", r.Header)
log.Println("收到body信息:", string(b))
// 创建一个业务逻辑层实例 // 创建一个业务逻辑层实例
l := logic.NewWebhookLogic(r.Context(), svcCtx) l := logic.NewWebhookLogic(r.Context(), svcCtx)