Skip to content
Myr

Update 4.4.3 HTTP Methods Example

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

Otherwise it produces `ValueError: View function did not return a response`.

authored by Swan Htet Aung · committed by GitHub · parent c9b33d0 · 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
304 unmodified lines
305306 @app.route('/login', methods=['GET', 'POST'])307 def login():308 if request.method == 'POST':309 do_the_login()309 return do_the_login()310 else:311 show_the_login_form()311 return show_the_login_form()312313If ``GET`` is present, ``HEAD`` will be added automatically for you. You314don't have to deal with that. It will also make sure that ``HEAD`` requests315are handled as the `HTTP RFC`_ (the document describing the HTTP
578 unmodified lines