|
@@ -64,8 +64,7 @@ func (e *EventHandler) SendMsg() *EventHandler {
|
|
e.Errs["rander error"] = err
|
|
e.Errs["rander error"] = err
|
|
return e
|
|
return e
|
|
}
|
|
}
|
|
- timestamp := time.Now().UnixNano() / 1e6
|
|
|
|
-
|
|
|
|
|
|
+ timestamp := time.Now().UnixNano() / int64(time.Millisecond)
|
|
headers["x-system-key"] = appkey
|
|
headers["x-system-key"] = appkey
|
|
headers["x-system-nonce"] = nonce.String()
|
|
headers["x-system-nonce"] = nonce.String()
|
|
headers["x-system-timestamp"] = fmt.Sprintf("%d", timestamp)
|
|
headers["x-system-timestamp"] = fmt.Sprintf("%d", timestamp)
|
|
@@ -120,6 +119,8 @@ func (e *EventHandler) SendMsg() *EventHandler {
|
|
for key, value := range headers {
|
|
for key, value := range headers {
|
|
req.Header.Set(key, value)
|
|
req.Header.Set(key, value)
|
|
}
|
|
}
|
|
|
|
+ // 设定json格式
|
|
|
|
+ req.Header.Set("Content-Type", "application/json")
|
|
|
|
|
|
resp, err := client.Do(req)
|
|
resp, err := client.Do(req)
|
|
if err != nil {
|
|
if err != nil {
|