校验参数是否存在,不存在返回400
@app.route('/check',methods=['POST']) def check(): values = request.get_json() required = ['a','b','c'] if not all(k in values for k in required): return "Missing values",400