diff --git a/OneflowSDK.py b/OneflowSDK.py index bfc9377..fdfdae6 100644 --- a/OneflowSDK.py +++ b/OneflowSDK.py @@ -5,7 +5,7 @@ import requests, hmac, hashlib, datetime from requests.adapters import HTTPAdapter from urllib3.util import Retry - +from urllib.parse import unquote class OneflowSDK: def __init__(self, url, token, secret, options=None): @@ -40,7 +40,7 @@ def requests_retry_session(self): def create_headers(self, method, path): timestamp = datetime.datetime.now().isoformat() - string_to_sign = method.upper() + " " + path + " " + timestamp + string_to_sign = method.upper() + " " + unquote(path) + " " + timestamp signature = hmac.new( bytes(self.secret, "utf-8"), bytes(string_to_sign, "utf-8"), hashlib.sha256 ).hexdigest()