fix
This commit is contained in:
parent
07fcd4b7b7
commit
25b774c905
@ -25,6 +25,9 @@ func NewWebhookLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebhookLo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EncryptWebhookMsg struct {
|
||||||
|
Encrypt string `json:"encrypt"` //加密的消息
|
||||||
|
}
|
||||||
type WebhookMsg struct {
|
type WebhookMsg struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Challenge string `json:"challenge"`
|
Challenge string `json:"challenge"`
|
||||||
@ -48,7 +51,8 @@ func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
|
|||||||
logx.Error("读取请求body失败", err)
|
logx.Error("读取请求body失败", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logx.Info("收到消息:", string(bodyBytes))
|
logx.Info("收到头消息:", r.Header)
|
||||||
|
logx.Info("收到body消息:", string(bodyBytes))
|
||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
//如果只是验证http连接的消息
|
//如果只是验证http连接的消息
|
||||||
var webhookMsg WebhookMsg
|
var webhookMsg WebhookMsg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user