Method
add_route
(
self,
path: str,
endpoint: Callable[[Request], Awaitable[Response] | Response],
methods: Collection[str] | None = None,
name: str | None = None,
include_in_schema: bool = True,
)
Source from the content-addressed store, hash-verified
| 2557 | return False |
| 2558 | |
| 2559 | def add_route( |
| 2560 | self, |
| 2561 | path: str, |
| 2562 | endpoint: Callable[[Request], Awaitable[Response] | Response], |
| 2563 | methods: Collection[str] | None = None, |
| 2564 | name: str | None = None, |
| 2565 | include_in_schema: bool = True, |
| 2566 | ) -> None: |
| 2567 | super().add_route( |
| 2568 | path, |
| 2569 | endpoint, |
| 2570 | methods=methods, |
| 2571 | name=name, |
| 2572 | include_in_schema=include_in_schema, |
| 2573 | ) |
| 2574 | self._mark_routes_changed() |
| 2575 | |
| 2576 | def add_websocket_route( |
| 2577 | self, |