mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
fix: callback post reqeust lack of operation header
This commit is contained in:
parent
4dc2313bbc
commit
3202e8dff3
@ -221,6 +221,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive
|
||||
statisticsGroup.POST("/group/create", g.GroupCreateCount)
|
||||
statisticsGroup.POST("/group/active", m.GetActiveGroup)
|
||||
}
|
||||
|
||||
callback := r.Group("/callbackExample")
|
||||
{
|
||||
callback.POST("/callbackBeforeSendSingleMsgCommand", m.CallbackExample)
|
||||
|
||||
@ -112,7 +112,9 @@ func callBackPostReturn(ctx context.Context, url, command string, input interfac
|
||||
//v.Set(constant.CallbackCommand, command)
|
||||
//url = url + "/" + v.Encode()
|
||||
url = url + "/" + command
|
||||
b, err := Post(ctx, url, nil, input, callbackConfig.CallbackTimeOut)
|
||||
header := map[string]string{}
|
||||
header["operationID"] = ctx.Value(constant.OperationID).(string)
|
||||
b, err := Post(ctx, url, header, input, callbackConfig.CallbackTimeOut)
|
||||
if err != nil {
|
||||
if callbackConfig.CallbackFailedContinue != nil && *callbackConfig.CallbackFailedContinue {
|
||||
log.ZWarn(ctx, "callback failed but continue", err, "url", url)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user