- refactor platformapi.AccessPlatformAPIWithRetry
This commit is contained in:
@@ -116,11 +116,7 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
|
||||
return request
|
||||
},
|
||||
a.config,
|
||||
func(response *http.Response) (result string, err error) {
|
||||
jsonResult1, err := utils.HTTPResponse2Json(response)
|
||||
if err != nil {
|
||||
return platformapi.ErrLevelGeneralFail, err
|
||||
}
|
||||
func(jsonResult1 map[string]interface{}) (result string, err error) {
|
||||
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
||||
retVal = &ResponseResult{
|
||||
Code: code,
|
||||
|
||||
Reference in New Issue
Block a user