Skip to content

Commit 683d507

Browse files
committed
prevent double slash before appending the API method
1 parent 28a3a0b commit 683d507

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

slack_sdk/web/internal_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def _get_url(base_url: str, api_method: str) -> str:
6767
The absolute API URL.
6868
e.g. 'https://slack.com/api/chat.postMessage'
6969
"""
70+
if base_url.endswith("/") and api_method.startswith("/"):
71+
base_url.rstrip("/")
7072
return urljoin(base_url, api_method)
7173

7274

0 commit comments

Comments
 (0)