httpx
httpx copied to clipboard
Added __iadd__ magic method to Cookies class
trafficstars
Summary
I have added iadd magic method to the Cookies class Now we got a new interface to update cookies rather than the update method
simple usage
from httpx import Cookies, get
cookies = Cookies()
r = httpx.get('example.com")
cookies += r.cookies
print(cookies)
Now 'cookies' contains the cookies from the response 'r' You can use 'cookies' in subsequent requests