|
@@ -12,7 +12,7 @@ import ( |
|
|
"time" |
|
|
"time" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func Send(method, key, secret string, param map[string]interface{}) { |
|
|
|
|
|
|
|
|
func Send(method, key, secret string, param map[string]interface{}) (string, error) { |
|
|
header := map[string]string{ |
|
|
header := map[string]string{ |
|
|
"S-Ca-App": key, |
|
|
"S-Ca-App": key, |
|
|
"S-Ca-Timestamp": zhios_third_party_utils.Int64ToStr(time.Now().Unix() * 1000), |
|
|
"S-Ca-Timestamp": zhios_third_party_utils.Int64ToStr(time.Now().Unix() * 1000), |
|
@@ -27,6 +27,7 @@ func Send(method, key, secret string, param map[string]interface{}) { |
|
|
post, err := zhios_third_party_utils.CurlPost(url+method, paramStr, header) |
|
|
post, err := zhios_third_party_utils.CurlPost(url+method, paramStr, header) |
|
|
fmt.Println(string(post)) |
|
|
fmt.Println(string(post)) |
|
|
fmt.Println(err) |
|
|
fmt.Println(err) |
|
|
|
|
|
return string(post), err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func GetSign(method, secret string, paramStr string, header map[string]string) map[string]string { |
|
|
func GetSign(method, secret string, paramStr string, header map[string]string) map[string]string { |
|
|