We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c099ca commit 464c110Copy full SHA for 464c110
aiosteamist/__init__.py
@@ -6,6 +6,7 @@
6
7
import aiohttp
8
import xmltodict # type: ignore
9
+from yarl import URL
10
11
__author__ = """J. Nick Koston"""
12
__email__ = "nick@koston.org"
@@ -49,12 +50,13 @@ def __init__(
49
50
self._timeout = timeout
51
self._host = host
52
self._auth_invalid = 0
53
+ self._url = URL(f"http://{self._host}")
54
55
async def _get(self, endpoint: str, params=None) -> str:
56
"""Make a get request."""
57
response = await self._websession.request(
58
"GET",
- f"http://{self._host}{endpoint}",
59
+ self._url.join(URL(endpoint)),
60
timeout=self._timeout,
61
params=params,
62
)
0 commit comments