fastapi-master/tests/test_modules_same_name_body/app/a.py

9 lines
160 B
Python
Raw Normal View History

2024-08-24 12:41:47 +08:00
from fastapi import APIRouter, Body
router = APIRouter()
@router.post("/compute")
def compute(a: int = Body(), b: str = Body()):
return {"a": a, "b": b}