Back to Falcon

2071.Newandimproved

docs/_newsfragments/2071.newandimproved.rst

4.3.0a1539 B
Original Source

A new router option, :attr:~falcon.routing.CompiledRouterOptions.default_to_on_request, was added to allow resources to provide a default responder via on_request() (disabled by default). When enabled, on_request() is used as the default responder for every unimplemented HTTP verb except on_options() (and the special on_websocket handler).

When the option is disabled, or the on_request() method is not implemented, the default responder for :class:"405 Method Not Allowed" <falcon.HTTPMethodNotAllowed> is used.