This commit is contained in:
richboo111
2024-01-10 16:15:09 +08:00
parent df03b3f7c9
commit bf27e49297

View File

@@ -486,19 +486,12 @@ func pushCallbackToGy(urlIndex string, msg interface{}) {
request, err = http.NewRequest(http.MethodPost, "http://callback-jxgy.jxc4.com/SFPS/SfOrder", strings.NewReader(string(b)))
}
//检测request数据
//data, err := ioutil.ReadAll(request.Body)
//temp := make(map[string]interface{})
//if err = json.Unmarshal(data, &temp); err == nil {
// globals.SugarLogger.Debugf("pushCallbackToGy test reqData temp=%s,err=%v", utils.Format4Output(temp, false), err)
//}
//
if err != nil {
globals.SugarLogger.Debugf("pushCallbackToGy test reqData err=%v", err)
return
}
request.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
//request.Header.Set("Content-Type", "application/json; charset=UTF-8")
//request.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
request.Header.Set("Content-Type", "application/json; charset=UTF-8")
resp, err := client.Do(request)
resopp, _ := ioutil.ReadAll(resp.Body)
globals.SugarLogger.Debugf("============ %s %v", string(resopp), err)