📜  烧瓶接收列表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:13.986000             🧑  作者: Mango

代码示例1
@app.route('/users/', methods=['POST'])
def get_users():
    ids = request.form.getlist('user_ids', type=int)
    users = []

    for id in ids:
        try:
            user = whatever_user_method(id)
            users.append(user)
        except:
            continue

    returns users