1
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strings"
|
||||
@@ -15,7 +14,7 @@ import (
|
||||
|
||||
const (
|
||||
// KuaiShouBashUrl 基础域名
|
||||
KuaiShouBashUrl = "https://open.kuaishou.com" // 域名
|
||||
KuaiShouBashUrl = "http://open.kuaishou.com" // 域名
|
||||
|
||||
KuaiShouAuthLogin = KuaiShouBashUrl + "/oauth2/mp/code2session" // 授权登录
|
||||
KuaiShouGetToken = KuaiShouBashUrl + "/oauth2/access_token" // 获取授权token
|
||||
@@ -87,10 +86,8 @@ func (a *API) GetToken() error {
|
||||
func (a *API) AccessAPI1(url string, params map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
globals.SugarLogger.Debugf("====param := %s", utils.Format4Output(params, false))
|
||||
globals.SugarLogger.Debugf("====url := %s", utils.Format4Output(url, false))
|
||||
request, _ := http.NewRequest(http.MethodPost, url, strings.NewReader(utils.Map2URLValues(params).Encode()))
|
||||
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
||||
request, _ := http.NewRequest(http.MethodPost, url, strings.NewReader(utils.Format4Output(params, false)))
|
||||
request.Header.Set("Content-Type", "application/json")
|
||||
return request
|
||||
},
|
||||
a.config,
|
||||
|
||||
Reference in New Issue
Block a user