sign log
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -144,6 +145,7 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
||||
}
|
||||
signURL := a.genURL(cmd) + "?"
|
||||
params[signKey] = a.signParams(signURL, params)
|
||||
globals.SugarLogger.Debugf("params[signKey]=============%s", params[signKey])
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
var request *http.Request
|
||||
@@ -224,6 +226,7 @@ func (a *API) AccessAPI3(cmd string, isGet bool, bizParams map[string]interface{
|
||||
params = utils.MergeMaps(params, bizParams)
|
||||
signURL := a.genURL(cmd) + "?"
|
||||
params[signKey] = a.signParams(signURL, params)
|
||||
globals.SugarLogger.Debugf("params[signKey]=============%s", params[signKey])
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
var request *http.Request
|
||||
|
||||
@@ -167,7 +167,7 @@ func TestAa2(t *testing.T) {
|
||||
fmt.Println(api.signParams(apiURL+"/oauth/authorize?", map[string]interface{}{
|
||||
"timestamp": time,
|
||||
"app_id": "5873",
|
||||
"app_poi_code": "5873_2705892",
|
||||
"app_poi_code": "12422751",
|
||||
"response_type": "token",
|
||||
}), time)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user