-
|
Description Additional context from starlette.responses import JSONResponse
resp = JSONResponse()
resp.set_cookie()But is there any other way? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
|
there's a whole page in the docs: https://fastapi.tiangolo.com/tutorial/cookie-params/ , does that help ? |
Beta Was this translation helpful? Give feedback.
-
|
@euri10 i've seen the docs, but how do i return modified cookie? |
Beta Was this translation helpful? Give feedback.
-
|
Is not well documented yet, but you would return a Starlette Response directly and set the cookie in it: https://www.starlette.io/responses/ |
Beta Was this translation helpful? Give feedback.
-
|
It is now properly documented: https://fastapi.tiangolo.com/tutorial/response-cookies/ 🎉 🍪 |
Beta Was this translation helpful? Give feedback.
-
|
As it is now in the docs, I'll close this issue now. But feel free to add more comments or create new issues. |
Beta Was this translation helpful? Give feedback.
-
|
Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs. |
Beta Was this translation helpful? Give feedback.
It is now properly documented: https://fastapi.tiangolo.com/tutorial/response-cookies/ 🎉 🍪