'Associates a templatized URI path with a resource.
Falcon routes incoming requests to resources based on a set of
URI templates. If the path requested by the client matches the
template for a given route, the request is then passed on to the
associated resource for processing.
If no route matches the request, control then passes to a
default responder that simply raises an instance of
:class:`~.HTTPNotFound`.
(See also: :ref:`Routing <routing>`)
Args:
uri_template (str): A templatized URI. Care must be
taken to ensure the template does not mask any sink
patterns, if any are registered.
(See also: :meth:`~.add_sink`)
resource (instance): Object which represents a REST
resource. Falcon will pass "GET" requests to on_get,
"PUT" requests to on_put, etc. If any HTTP methods are not
supported by your resource, simply don\'t define the
corresponding request handlers, and Falcon will do the right
thing.
Note:
Any additional args and kwargs not defined above are passed
through to the underlying router\'s ``add_route()`` method. The
default router does not expect any additional arguments, but
custom routers may take advantage of this feature to receive
additional options when setting up routes.'

def add_route(self, uri_template, resource, *args, **kwargs):

    if (not isinstance(uri_template, six.string_types)):
        raise TypeError('uri_template    is    not    a    string')
    if (not uri_template.startswith('/')):
        raise ValueError("uri_template    must    start    with    '/'")
    if ('//' in uri_template):
        raise ValueError("uri_template    may    not    contain    '//'")
    method_map = routing.create_http_method_map(resource)
    self._router.add_route(uri_template, method_map, resource, *args, **kwargs)
