()
| 1035 | def replace_body_middleware(app: ASGIApp) -> ASGIApp: |
| 1036 | async def wrapped_app(scope: Scope, receive: Receive, send: Send) -> None: |
| 1037 | async def wrapped_rcv() -> Message: |
| 1038 | msg = await receive() |
| 1039 | msg["body"] += b"-foo" |
| 1040 | return msg |
| 1041 | |
| 1042 | await app(scope, wrapped_rcv, send) |
| 1043 |