| 1 |
from litestar import Litestar, get |
| 2 |
from litestar.datastructures import Cookie |
| 3 |
|
| 4 |
|
| 5 |
@get("/", response_cookies=[Cookie(key="my-cookie", value="cookie-value")]) |
| 6 |
async def handler() -> str: |
| 7 |
return "hello" |
| 8 |
|
| 9 |
|
| 10 |
app = Litestar(route_handlers=[handler]) |