11f3c79a77
When user specifies HTTP methods to function handlers, it automatically will be overloaded unless they duplicate. Example: # This is a new route. It works as before. @app.route('/overload', methods=['GET']) async def handler1(request): return text('OK1') # This is the exiting route but a new method. They are merged and # work as combined. The route will serve all of GET, POST and PUT. @app.route('/overload', methods=['POST', 'PUT']) async def handler2(request): return text('OK2') # This is the existing route and PUT method is the duplicated method. # It raises RouteExists. @app.route('/overload', methods=['PUT', 'DELETE']) async def handler3(request): return text('Duplicated') |
||
---|---|---|
.. | ||
performance | ||
static | ||
test_bad_request.py | ||
test_blueprints.py | ||
test_cookies.py | ||
test_custom_protocol.py | ||
test_exceptions_handler.py | ||
test_exceptions.py | ||
test_logging.py | ||
test_middleware.py | ||
test_multiprocessing.py | ||
test_payload_too_large.py | ||
test_request_data.py | ||
test_request_timeout.py | ||
test_requests.py | ||
test_response.py | ||
test_routes.py | ||
test_server_events.py | ||
test_static.py | ||
test_utf8.py | ||
test_vhosts.py | ||
test_views.py |