Skip to content
Myr

Fix code example for HTTP Methods

Before adoption: this commit came in with the history the project adopted, so no landing records it.

`return` is required to make 'http methods' example work

authored by Vladimir Kroz · committed by Adrian · parent 9520fbd · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/quickstart.rst+2 added-2 removed
313 unmodified lines
314315 @app.route('/login', methods=['GET', 'POST'])316 def login():317 if request.method == 'POST':318 do_the_login()318 return do_the_login()319 else:320 show_the_login_form()320 return show_the_login_form()321322If ``GET`` is present, Flask automatically adds support for the ``HEAD`` method323and handles ``HEAD`` requests according to the the `HTTP RFC`_. Likewise,324``OPTIONS`` is automatically implemented for you.
522 unmodified lines