cbs.py 387 B

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