|
@@ -72,7 +72,7 @@ func OuterReportCallBack(outReportId int, title, fileUrl, fileType string) (err
|
|
|
requestUrl = conf.ConfVal + OuterReportCallBackApiUrl
|
|
|
|
|
|
// 请求接口
|
|
|
- resByte, e := OuterReportCallBackPost(requestUrl, params, "application/json")
|
|
|
+ resByte, e := OuterReportCallBackPut(requestUrl, params, "application/json;charset=utf-8")
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("接口请求失败, %v", e)
|
|
|
return
|
|
@@ -89,11 +89,11 @@ func OuterReportCallBack(outReportId int, title, fileUrl, fileType string) (err
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// OuterReportCallBackPost 外部报告回调POST
|
|
|
-func OuterReportCallBackPost(url, postData string, params ...string) ([]byte, error) {
|
|
|
+// OuterReportCallBackPut 外部报告回调POST
|
|
|
+func OuterReportCallBackPut(url, postData string, params ...string) ([]byte, error) {
|
|
|
body := ioutil.NopCloser(strings.NewReader(postData))
|
|
|
client := &http.Client{}
|
|
|
- req, e := http.NewRequest("POST", url, body)
|
|
|
+ req, e := http.NewRequest("PUT", url, body)
|
|
|
if e != nil {
|
|
|
return nil, fmt.Errorf("http request err: %v", e)
|
|
|
}
|