×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Pavel Evtikhov
Added: Feb 10, 2022 6:02 PM
Modified: Feb 10, 2022 6:12 PM
Views: 401
Tags: no tags
  1. @app.route("/post", methods=['GET', 'POST'])
  2. def page_post_create():
  3.     if request.method == 'GET':
  4.         return 'GET method'
  5.     elif request.method == 'POST':
  6.         content = request.form.get('content')
  7.         return content
  8.     else:
  9.         return 'unknown method'