|
|
@ -20,7 +20,6 @@ import (
|
|
|
|
"encoding/json"
|
|
|
|
"encoding/json"
|
|
|
|
"io"
|
|
|
|
"io"
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
urllib "net/url"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/OpenIMSDK/protocol/constant"
|
|
|
|
"github.com/OpenIMSDK/protocol/constant"
|
|
|
@ -108,10 +107,11 @@ func PostReturn(ctx context.Context, url string, header map[string]string, input
|
|
|
|
|
|
|
|
|
|
|
|
func callBackPostReturn(ctx context.Context, url, command string, input interface{}, output callbackstruct.CallbackResp, callbackConfig config.CallBackConfig) error {
|
|
|
|
func callBackPostReturn(ctx context.Context, url, command string, input interface{}, output callbackstruct.CallbackResp, callbackConfig config.CallBackConfig) error {
|
|
|
|
defer log.ZDebug(ctx, "callback", "url", url, "command", command, "input", input, "callbackConfig", callbackConfig)
|
|
|
|
defer log.ZDebug(ctx, "callback", "url", url, "command", command, "input", input, "callbackConfig", callbackConfig)
|
|
|
|
|
|
|
|
//
|
|
|
|
v := urllib.Values{}
|
|
|
|
//v := urllib.Values{}
|
|
|
|
v.Set(constant.CallbackCommand, command)
|
|
|
|
//v.Set(constant.CallbackCommand, command)
|
|
|
|
url = url + "?" + v.Encode()
|
|
|
|
//url = url + "/" + v.Encode()
|
|
|
|
|
|
|
|
url = url + "/" + command
|
|
|
|
|
|
|
|
|
|
|
|
b, err := Post(ctx, url, nil, input, callbackConfig.CallbackTimeOut)
|
|
|
|
b, err := Post(ctx, url, nil, input, callbackConfig.CallbackTimeOut)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|