Skip to content

Commit 26a0a9e

Browse files
authored
add U-Timestamp-Ms in request header (#93)
1 parent 18a5d71 commit 26a0a9e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ucloud/core/client/_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import typing
22
import logging
33
import sys
4+
import time
45

56
from ucloud import version
67
from ucloud.core.client._cfg import Config
@@ -158,6 +159,7 @@ def _build_http_request(self, args: dict) -> Request:
158159
headers={
159160
"User-Agent": self._build_user_agent(),
160161
"Content-Type": "application/x-www-form-urlencoded",
162+
"U-Timestamp-Ms": str(int(round(time.time() * 1000))),
161163
},
162164
)
163165

0 commit comments

Comments
 (0)