title: Flask: differences between request.form["xxxxx"], request.form.get("xxxxxx") and request.args.get("xxxxx")?
body: <p>What are the differences between <code>flask.request.form["xxx"]</code> , <code>flask.request.form.get("xxx")</code> and <code>flask.request.args.get("xxx")</code> ?  </p>
  
  <p>I have this question because I am using flask-login to handle authentication.<br>
  In particular in the following code (taken from the flask-login github page), I don't understand why with <code>req.form.get("email")</code>, email is <code>None</code>, while with <code>req.form["email"]</code>, email hasn't a value. Here's the code. </p>
  
  <pre><code>@login_manager.request_loader
  def request_loader(req):
      email = req.form.get('email')
      if email not in users:
          return
  
      user = User()
      user.id = email
  
      # DO NOT ever store passwords in plaintext and always compare password
      # hashes using constant-time comparison!
      user.is_authenticated = req.form['pw'] == users[email]['pw']
  
      return user
  </code></pre>