Explorar el Código

新增钢联指标

tuoling805 hace 1 año
padre
commit
82f2aa4bf5
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      services/base.go

+ 4 - 0
services/base.go

@@ -38,6 +38,10 @@ func HttpPost(url, postData string, params ...string) ([]byte, error) {
 	req.Header.Set("Content-Type", contentType)
 	req.Header.Set("authorization", utils.MD5(utils.APP_EDB_LIB_NAME_EN+utils.EDB_LIB_Md5_KEY))
 	resp, err := client.Do(req)
+	if err != nil {
+		fmt.Println("client.Do err:" + err.Error())
+		return nil, err
+	}
 	defer resp.Body.Close()
 	b, err := ioutil.ReadAll(resp.Body)
 	fmt.Println("HttpPost:" + string(b))