json.Marshal

This commit is contained in:
jiangyong27 2024-05-09 20:34:55 +08:00
parent 2cdd9c7b32
commit ac11b506af
1 changed files with 6 additions and 1 deletions

View File

@ -154,7 +154,12 @@ func (g *Getui) Push(req *GetuiMessage) (*GetuiPushRsp, error) {
},
},
}
reqBody, _ := json.Marshal(params)
reqBody, err := json.Marshal(params)
if err != nil {
log.Errorf("json.Marshal error :%s", err.Error())
return nil, err
}
rspBody, err := util.HttpPostJson(reqUrl, map[string]string{"token": g.Token()}, reqBody)
if err != nil {
log.Errorf("goutil http post error :%s", err.Error())