[QUESTION] Return cookie in response
See original GitHub issueDescription How can i return cookies in response?
Additional context It would be great addition to docs. I know its possible with
from starlette.responses import JSONResponse
resp = JSONResponse()
resp.set_cookie()
But is there any other way?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Set-Cookie - HTTP - MDN Web Docs
The Set-Cookie HTTP response header is used to send a cookie from the server to the user agent, so that the user agent...
Read more >Should I return the cookie in every web response?
If the client comes in with a cookie that's bound to expire, say, less than 1 hour and 50 minutes from now, you...
Read more >Question: Can't able to retrieve the Set-Cookie Header value
Hi,. I'm facing the issue regarding Http Client Connector. Can't able to retrieve the Header (Name= Set-Cookie).
Read more >Set Cookie in Mock Service - Forums - IBM Support
Hi,. I hope that someone can help me with the following problem: I need to create a mock service which consumes an http...
Read more >A problem with Set-Cookie (Spring forum at Coderanch)
... I have only found references that use "Set-Cookie:name=userName" in response header, but I have not been able to determine how to do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As it is now in the docs, I’ll close this issue now. But feel free to add more comments or create new issues.
It is now properly documented: https://fastapi.tiangolo.com/tutorial/response-cookies/ 🎉 🍪