Skip to content

Commit

Permalink
fix: merge existing params in url, close encode#3433
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyElaina authored Dec 2, 2024
1 parent 15e21e9 commit a899066
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion httpx/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ def __init__(
extensions: RequestExtensions | None = None,
) -> None:
self.method = method.upper()
self.url = URL(url) if params is None else URL(url, params=params)
self.url = URL(url)
if params is not None:
self.url = self.url.copy_merge_params(params=params)
self.headers = Headers(headers)
self.extensions = {} if extensions is None else dict(extensions)

Expand Down

0 comments on commit a899066

Please sign in to comment.