zz.py 382 B

123456789101112131415161718
  1. from fastapi import APIRouter
  2. api_zz = APIRouter()
  3. @api_zz.get("/get")
  4. async def get_test():
  5. return {"method": "get method"}
  6. @api_zz.post("/post")
  7. async def post_test():
  8. return {"method": "post method"}
  9. @api_zz.put("/put")
  10. async def put_test():
  11. return {"method": "put method"}
  12. @api_zz.delete("/delete")
  13. async def delete_test():
  14. return {"method": "delete method"}