see below: methods = ["GET", "POST"] and then check request.method if it is a POST and then request.form.data ...