后端开发——请求与响应

一、查询请求 GET

    @app.route("/cases", methods=["get"])
    def get_cases():
        return {"code": 0, "message": "get success"}

二、新增请求 POST

@app.route("/cases", methods=["post"])
    def post_cases():
        return {"code": 0, "message": "get success"}

三、修改请求 PUT

@app.route("/cases", methods=["post","put"])
    def put_cases():
        return {"code": 0, "message": "update success"}

四、删除请求 DELETE