|
@@ -108,7 +108,7 @@ func HttpRequest(url string, ak string, sk string, timestamp int64, requestByte
|
108
|
108
|
|
109
|
109
|
//添加附加的http请求头 (可以定义多条)
|
110
|
110
|
//key := "_api_access_key=" + ak + "&_api_name=" + "hssServives" + "&_api_timestamp=" + strconv.FormatInt(timestamp, 10) + "&_api_version=" + "1.0.0"
|
111
|
|
- csbHP.AddHeader("_api_timestamp", strconv.FormatInt(timestamp, 10))
|
|
111
|
+ csbHP.AddHeader("_api_timestamp", strconv.FormatInt(timestamp/1000, 10))
|
112
|
112
|
csbHP.AddHeader("_api_name", "hssServives")
|
113
|
113
|
csbHP.AddHeader("_api_version", "1.0.0")
|
114
|
114
|
csbHP.AddHeader("_api_access_key", ak)
|
|
@@ -126,7 +126,7 @@ func HttpRequest(url string, ak string, sk string, timestamp int64, requestByte
|
126
|
126
|
csbHP.Print()
|
127
|
127
|
//进行调用, 返回的第二项为resonse http headers (map[string][]string类型)
|
128
|
128
|
//res, _, err := csbhttp.Invoke(*csbHP, requestByte)
|
129
|
|
- res, _, err := csbhttp.Invoke(*csbHP, strconv.FormatInt(timestamp, 10))
|
|
129
|
+ res, _, err := csbhttp.Invoke(*csbHP, strconv.FormatInt(timestamp/1000, 10))
|
130
|
130
|
//是否发成错误
|
131
|
131
|
if err != nil {
|
132
|
132
|
fmt.Println(err)
|