- dadaapi added.

- refactor.
This commit is contained in:
gazebo
2018-06-21 14:23:01 +08:00
parent e1b377086e
commit 851b2c1eeb
10 changed files with 424 additions and 70 deletions

View File

@@ -6,6 +6,8 @@ import (
"net/http"
"time"
"github.com/fatih/structs"
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/utils"
)
@@ -40,6 +42,10 @@ var (
CBErrMsgUnmarshal = "can not unmarshal data:%v, data:%v"
)
func init() {
structs.DefaultTagName = "json"
}
func AccessPlatformAPIWithRetry(params *AccessPlatformAPIWithRetryParams, handleResponse func(response *http.Response) (string, error)) error {
exceedLimitRetryCount := 0
recoverableErrorRetryCount := 0