Replies: 1 comment 5 replies
-
|
The set cookie function is here How do you know the cookie is not set? When I run the sample code in the docs I see it. $ curl -I -X POST http://127.0.0.1:8000/cookie/
HTTP/1.1 200 OK
date: Fri, 27 Oct 2023 17:52:25 GMT
server: uvicorn
content-length: 52
content-type: application/json
set-cookie: fakesession=fake-cookie-session-value; Path=/; SameSite=lax |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
According to the doc sending a response cookie if pretty simple exepct it's not working at all. I tried the exact example of the doc and it doesn't add the set cookie header.
I went in the code to see what's not happening but and i can't even find the set_cookie function in the JSONResponse object. What's happening with this feature? Thanks.
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.103.1
Pydantic Version
2.3.0
Python Version
3.9.2
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions