title: How to allow POST method with Flask?
body: <p>I'm doing a web Flask app with "sign up" and "log in" functions. I'd like to use a POST method for the "sign up" function, like this:</p>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  
  @app.route('/')
  def index():
      return "Index"
  
  @app.route("/signup/&lt;username&gt;,&lt;password&gt;" , methods = ['POST'])
  def signup(username, password):
  
      return "Hello %s ! Your pw is %s" % (username,password)
  
  
  if __name__== "__main__":
      app.run(debug=True)
  </code></pre>
  
  <p>But when I ran it, I received this error : "Method not allowed. The method is not allowed for the requested URL."</p>
  
  <p>How can I do? Thanks in advance.</p>