Skip to content

Commit

Permalink
Fix double url encoding for GET requests (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 15, 2023
1 parent 5a303d8 commit 4313922
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/synology_dsm/synology_dsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,8 @@ async def _execute_request(self, method: str, url: str, params: dict, **kwargs):
# Execute Request
try:
if method == "GET":
encoded_params = "&".join(
f"{key}={quote(str(value))}" for key, value in params.items()
)
async with async_timeout.timeout(self._timeout):
response = await self._session.get(
url, params=encoded_params, **kwargs
)
response = await self._session.get(url, params=params, **kwargs)
elif method == "POST":
data = {}
data.update(params)
Expand Down

0 comments on commit 4313922

Please sign in to comment.