- try to fix EOF bug when accessing wenxi api.

This commit is contained in:
gazebo
2018-08-05 16:11:07 +08:00
parent af1155e415
commit 0924e3719d
2 changed files with 2 additions and 1 deletions

View File

@@ -97,6 +97,7 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, body strin
} else {
request, _ = http.NewRequest(http.MethodPost, fullURL, strings.NewReader(body))
}
request.Close = true // todo try to fix EOF error when accessing weixin api.
err = platformapi.AccessPlatformAPIWithRetry(a.client, request, a.config, func(response *http.Response) (result string, err error) {
jsonResult1, err := utils.HTTPResponse2Json(response)
if err != nil {