Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 466a99a

Browse files
committed
Apply cached token to header if cache_token is True
1 parent 1d334ce commit 466a99a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pancloud/httpclient.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ def request(self, **kwargs):
253253

254254
# Prepare and send the Request() and return Response()
255255
try:
256+
if credentials:
257+
if credentials.cache_token:
258+
h = self._apply_credentials(
259+
k['headers'], credentials)
260+
k['headers'] = h
256261
r = self._send_request(
257262
enforce_json, method, raise_for_status, url, **k
258263
)

0 commit comments

Comments
 (0)