Method
__call__
tests/test_requests.py:661–665
· tests/test_requests.py::CustomMiddleware.__call__
(self, scope: Scope, receive: Receive, send: Send)
Source from the content-addressed store, hash-verified
| 659 | self.app = app |
| 660 | |
| 661 | async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: |
| 662 | nonlocal url_for |
| 663 | request = Request(scope, receive) |
| 664 | url_for = request.url_for(class="st">"homepage") |
| 665 | await self.app(scope, receive, send) |
| 666 | |
| 667 | app = Starlette(routes=[Route(class="st">"/home", homepage)], middleware=[Middleware(CustomMiddleware)]) |
| 668 | |
Callers
nothing calls this directly
Tested by
no test coverage detected