Checklist
Question
I've been using this code in requests to save cookies to a file.
session = requests.Session()
json.dump(session.cookies.get_dict(), open(cookies.txt, 'w'))
and this code to open cookies file and set it to session cookies
cookies = requests.utils.cookiejar_from_dict(json.load(open('Cookies/cookies.txt', 'r')))
session.cookies.update(cookies)
How i do that in httpx? because httpx.Client.cookies doesn't have get_dict attribute.
Thank you.
Checklist
Question
I've been using this code in requests to save cookies to a file.
session = requests.Session()
json.dump(session.cookies.get_dict(), open(cookies.txt, 'w'))
and this code to open cookies file and set it to session cookies
cookies = requests.utils.cookiejar_from_dict(json.load(open('Cookies/cookies.txt', 'r')))
session.cookies.update(cookies)
How i do that in httpx? because httpx.Client.cookies doesn't have get_dict attribute.
Thank you.