MCPcopy
hub / github.com/aio-libs/aiohttp / add_route

Method add_route

aiohttp/web_urldispatcher.py:831–835  ·  aiohttp/web_urldispatcher.py::UrlDispatcher.add_route
(self, method, path, handler,
                  *, name=None, expect_handler=None)

Source from the content-addressed store, hash-verified

829 return resource
830
831 def add_route(self, method, path, handler,
832 *, name=None, expect_handler=None):
833 resource = self.add_resource(path, name=name)
834 return resource.add_route(method, handler,
835 expect_handler=expect_handler)
836
837 def add_static(self, prefix, path, *, name=None, expect_handler=None,
838 chunk_size=256*1024, response_factory=StreamResponse):

Callers

nothing calls this directly

Calls 2

add_resourceMethod · 0.95
add_routeMethod · 0.45

Tested by

no test coverage detected