Merge pull request #2175 from swanhtet1992/patch-1
Update 4.4.3 HTTP Methods Example
This commit is contained in:
commit
9e2807da76
1 changed files with 2 additions and 2 deletions
|
|
@ -306,9 +306,9 @@ can be changed by providing the ``methods`` argument to the
|
|||
@app.route('/login', methods=['GET', 'POST'])
|
||||
def login():
|
||||
if request.method == 'POST':
|
||||
do_the_login()
|
||||
return do_the_login()
|
||||
else:
|
||||
show_the_login_form()
|
||||
return show_the_login_form()
|
||||
|
||||
If ``GET`` is present, ``HEAD`` will be added automatically for you. You
|
||||
don't have to deal with that. It will also make sure that ``HEAD`` requests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue