from flask import request
      
      @app.route('/myroute', methods=['GET', 'POST'])
      def login():
        if request.method == 'POST':
          form_value = request.form['form_name']
          return do_post()
        else:
          return do_get()
      
      Python language logo
      your recipe card header background

      Flask route with multiple methods

      Python Flask

      Library: flask

      Shortcut: flask.route.multiple-methods

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.