My problem is that with the given code:
from flask import Flask, request
app = Flask(__name__)
@app.route(\"/\")
def hello():
return str(request.values
You can use getlist, which is similar to Django's getList but for some reason isn't mentioned in the Flask documentation:
return str(request.args.getlist('param'))
The result is:
[u'a', u'bbb']
Use request.args if the param is in the query string (as in the question), request.form if the values come from multiple form inputs with the same name. request.values combines both, but should normally be avoided for the more specific collection.