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

Method modified_send

tests/test_routing.py:806–809  ·  view source on GitHub ↗
(msg: Message)

Source from the content-addressed store, hash-verified

804 scope["add_headers_middleware"] = True
805
806 async def modified_send(msg: Message) -> None:
807 if msg["type"] == "http.response.start":
808 msg["headers"].append((b"X-Test", b"Set by middleware"))
809 await send(msg)
810
811 await self.app(scope, receive, modified_send)
812

Callers

nothing calls this directly

Calls 2

sendFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected