INNER CODE UNIT · Python
can
falconry/falcon · falcon/app.py:680
class can use suffixed responders to distinguish requests
for a single item vs. a collection of those same items.
Another class might use a suffixed responder to handle
a shortlink route in addition to the regular route for the
resource. For example::
class Baz(object):
def on_get_foo(self, req, resp):
pass
def on_get_bar(self, req, resp):
pass
baz = Baz()
app = falcon.App()
app.add_route('/foo', baz, suffix='foo')
app.add_route('/bar', baz, suffix='bar')