第一次提交
This commit is contained in:
8
test/server/routes/example.py
Normal file
8
test/server/routes/example.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from fastapi import APIRouter, Response
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/hello")
|
||||
def hello(response: Response):
|
||||
response.set_cookie(key="cookie1", value="value1")
|
||||
return {"message": "Hello, FastAPI with CORS!"}
|
Reference in New Issue
Block a user