This commit is contained in:
邹宗楠
2024-12-13 17:00:58 +08:00
parent 77e30e583b
commit 5fa49d0b98
7 changed files with 38 additions and 17 deletions

View File

@@ -97,11 +97,12 @@ func (a *API) HttpPostJson(url string, data interface{}) *TIResponse {
resp, err := client.Do(request)
//resp, err := http.Post(utils.GenerateGetURL(BaseUrl, url, nil), "application/json;charset=UTF-8", bytes.NewBuffer(b))
if err != nil {
fmt.Println(err)
return nil
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
glo
var msg = fmt.Sprintf("post json error:%+v", err)
fmt.Println(msg)
}