-
-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Description
Reproducible code sample:
cookies = [
{
"name": "foo",
"value": "bar",
"domain": "exampl.com",
"path": "/",
"expires": 1681290623,
"httpOnly": True,
"secure": True,
"sameSite": "None",
},
{
"name": "spam",
"value": "eggs",
"domain": "exampl.com",
"path": "/",
"expires": 1681290623,
"httpOnly": True,
"secure": True,
"sameSite": "None",
},
]
container = httpx.Cookies()
for cookie in cookies:
container.set(name=cookie["name"], value=cookie["value"], domain=cookie["domain"], path=cookie["path"])
r = httpx.get(
"https://httpbin.org/cookies/set",
cookies=container,
follow_redirects=True,
)
print(r.text)Response output:
{
"cookies": {}
}
Versions
- httpx 0.22.0
- Python 3.10
Metadata
Metadata
Assignees
Labels
No labels