MCPcopy
hub / github.com/encode/starlette / __call__

Method __call__

tests/test_routing.py:1003–1009  ·  view source on GitHub ↗
(self, scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

1001 self.app = app
1002
1003 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
1004 async def modified_send(msg: Message) -> None:
1005 if msg["type"] == "websocket.accept":
1006 msg["headers"].append((b"X-Test", b"Set by middleware"))
1007 await send(msg)
1008
1009 await self.app(scope, receive, modified_send)
1010
1011 app = Starlette(
1012 routes=[

Callers

nothing calls this directly

Calls 1

appMethod · 0.45

Tested by

no test coverage detected