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