Skip to content

Commit

Permalink
Concise URL instantiation. (#3364)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie authored Oct 25, 2024
1 parent 6f9b509 commit 3f76571
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions httpx/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,7 @@ def __init__(
if isinstance(method, bytes)
else method.upper()
)
self.url = URL(url)
if params is not None:
self.url = self.url.copy_merge_params(params=params)
self.url = URL(url) if params is None else URL(url, params=params)
self.headers = Headers(headers)
self.extensions = {} if extensions is None else extensions

Expand Down

0 comments on commit 3f76571

Please sign in to comment.