Skip to content

Commit 109a69a

Browse files
committed
Make the path URL safe
1 parent 9d409c5 commit 109a69a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

socketdev/core/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from socketdev.version import __version__
1717
from requests.exceptions import Timeout, ConnectionError
1818
import time
19+
import urllib.parse
1920

2021

2122
class API:
@@ -47,6 +48,7 @@ def do_request(
4748
"User-Agent": f"SocketPythonScript/{__version__}",
4849
"accept": "application/json",
4950
}
51+
path = urllib.parse.quote(path)
5052
url = f"{self.api_url}/{path}"
5153

5254
def format_headers(headers_dict):

socketdev/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.11"
1+
__version__ = "2.0.12"

0 commit comments

Comments
 (0)