MCPcopy
hub / github.com/slackapi/python-slack-sdk / _get_url

Function _get_url

slack_sdk/web/internal_utils.py:60–73  ·  view source on GitHub ↗

Joins the base Slack URL and an API method to form an absolute URL. Args: base_url (str): The base URL api_method (str): The Slack Web API method. e.g. 'chat.postMessage' Returns: The absolute API URL. e.g. 'https://slack.com/api/chat.postMessage'

(base_url: str, api_method: str)

Source from the content-addressed store, hash-verified

58
59
60def _get_url(base_url: str, api_method: str) -> str:
61 """Joins the base Slack URL and an API method to form an absolute URL.
62
63 Args:
64 base_url (str): The base URL
65 api_method (str): The Slack Web API method. e.g. 'chat.postMessage'
66
67 Returns:
68 The absolute API URL.
69 e.g. 'https://slack.com/api/chat.postMessage'
70 """
71 # Ensure no leading slash in api_method to prevent double slashes
72 api_method = api_method.lstrip("/")
73 return urljoin(base_url, api_method)
74
75
76def _get_headers(

Callers 4

api_callMethod · 0.70
api_callMethod · 0.70
api_callMethod · 0.70

Calls

no outgoing calls

Tested by 1