Skip to content

Commit

Permalink
Support absolute url to override base url
Browse files Browse the repository at this point in the history
  • Loading branch information
vivodi committed Dec 1, 2024
1 parent 5c886b6 commit 1b560f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,8 @@ def request(

def _build_url(self, str_or_url: StrOrURL) -> URL:
url = URL(str_or_url)
is_relative_path = self._base_url and not url.absolute
if is_relative_path:
if self._base_url and not url.absolute:
return self._base_url.join(url)

return url

async def _request(
Expand Down

0 comments on commit 1b560f2

Please sign in to comment.