Skip to content

Commit 0c91f8b

Browse files
Revert "add trailing slash to the end of the url (#1594)"
This reverts commit c82c9a0.
1 parent c82c9a0 commit 0c91f8b

File tree

4 files changed

+0
-14
lines changed

4 files changed

+0
-14
lines changed

slack_sdk/web/async_base_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def __init__(
4646
):
4747
self.token = None if token is None else token.strip()
4848
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
49-
if not base_url.endswith("/"):
50-
base_url += "/"
5149
self.base_url = base_url
5250
"""A string representing the Slack API base URL.
5351
Default is `'https://slack.com/api/'`."""

slack_sdk/web/base_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ def __init__(
5959
):
6060
self.token = None if token is None else token.strip()
6161
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
62-
if not base_url.endswith("/"):
63-
base_url += "/"
6462
self.base_url = base_url
6563
"""A string representing the Slack API base URL.
6664
Default is `'https://slack.com/api/'`."""

slack_sdk/web/legacy_base_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ def __init__(
6262
):
6363
self.token = None if token is None else token.strip()
6464
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
65-
if not base_url.endswith("/"):
66-
base_url += "/"
6765
self.base_url = base_url
6866
"""A string representing the Slack API base URL.
6967
Default is `'https://slack.com/api/'`."""

tests/slack_sdk/web/test_web_client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,3 @@ def test_user_auth_blocks(self):
229229
user_auth_blocks=[DividerBlock(), DividerBlock()],
230230
)
231231
self.assertIsNone(new_message.get("error"))
232-
233-
def test_base_url_appends_trailing_slash_issue_15141(self):
234-
client = self.client
235-
self.assertEqual(client.base_url, "http://localhost:8888/")
236-
237-
def test_base_url_preserves_trailing_slash_issue_15141(self):
238-
client = WebClient(base_url="http://localhost:8888/")
239-
self.assertEqual(client.base_url, "http://localhost:8888/")

0 commit comments

Comments
 (0)