diff --git a/httpx/_models.py b/httpx/_models.py index 92b393a233..b7efc33726 100644 --- a/httpx/_models.py +++ b/httpx/_models.py @@ -1173,6 +1173,14 @@ def __repr__(self) -> str: ) return f"" + + def __iadd__(self, other): + if isinstance(other, self.__class__): + self._cookies.update(other._cookies) + else: + raise ValueError("Cannot add a non-Cookies instance.") + + return self class _CookieCompatRequest(urllib.request.Request): """