fork download
  1. @app.route('/postmethods', methods=['POST'])
  2. def get_post_data():
  3. if request.method == 'POST':
  4. data = request.data
  5. return data
  6. else:
  7. return 'Make POST query.'
Runtime error #stdin #stdout #stderr 0.14s 23448KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
NameError: name 'app' is not defined