Repository navigation
Cookies and custom auth #3744
Replies: 3 comments
|
I have learned that |
Why this happens under the hoodTwo architectural design decisions in 1.
|
|
Before retrying, rebuild the header from your shared CookieJar so updated cookies replace stale ones request.headers.pop("cookie", None)
httpx.Cookies(jar).set_cookie_header(request) |
Uh oh!
There was an error while loading. Please reload this page.
Ok, so:
AsyncClientCookieJarto the clientAuthimplementation to implement custom on-demand authenticationWhat I'm seeing is that cookies are being inconsistently set on requests? I was expecting global implicit cookies (that I'm responsible for serializing), but with log level DEBUG I'm seeing that cookies are only sent if I explicitly set them on each request. And even then, I can't seem to force cookies on the final re-request.
All reactions