|
@@ -4,6 +4,7 @@ import (
|
|
|
"bytes"
|
|
|
"encoding/json"
|
|
|
"errors"
|
|
|
+ "fmt"
|
|
|
"io"
|
|
|
"net/http"
|
|
|
)
|
|
@@ -15,7 +16,7 @@ func PostJsonResponseJson(url string, params map[string]string) (string, error)
|
|
|
}
|
|
|
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
|
|
|
if err != nil {
|
|
|
- return "", errors.New("发送请求失败,错误信息为:" + err.Error())
|
|
|
+ return "", errors.New("发送请求失败,请求路径为:" + url + ",请求参数为:" + fmt.Sprintf("%v", params) + ",错误信息为:" + err.Error())
|
|
|
}
|
|
|
defer func(Body io.ReadCloser) {
|
|
|
_ = Body.Close()
|