- elm and weixin token refresh.

This commit is contained in:
gazebo
2018-06-26 15:26:39 +08:00
parent 910c9e02d1
commit ee4e88594d
8 changed files with 241 additions and 30 deletions

View File

@@ -13,8 +13,8 @@ import (
)
const (
sandboxURL = "http://newopen.qa.imdada.cn/"
prodURL = "http://newopen.imdada.cn/"
sandboxURL = "http://newopen.qa.imdada.cn"
prodURL = "http://newopen.imdada.cn"
signKey = "signature"
)
@@ -109,7 +109,7 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
}
params2[signKey] = a.signParams(params2)
params2Bytes := utils.MustMarshal(params2)
request, _ := http.NewRequest("POST", a.url+action, bytes.NewReader(params2Bytes))
request, _ := http.NewRequest("POST", a.url+"/"+action, bytes.NewReader(params2Bytes))
request.Header.Set("Content-Type", "application/json")
err = platformapi.AccessPlatformAPIWithRetry(a.client, request, a.config, func(response *http.Response) (result string, err error) {