(scope: Scope, receive: Receive, send: Send)
| 99 | |
| 100 | |
| 101 | async def slow_response(scope: Scope, receive: Receive, send: Send) -> None: |
| 102 | await send( |
| 103 | { |
| 104 | "type": "http.response.start", |
| 105 | "status": 200, |
| 106 | "headers": [[b"content-type", b"text/plain"]], |
| 107 | } |
| 108 | ) |
| 109 | await sleep(1.0) # Allow triggering a read timeout. |
| 110 | await send({"type": "http.response.body", "body": b"Hello, world!"}) |
| 111 | |
| 112 | |
| 113 | async def status_code(scope: Scope, receive: Receive, send: Send) -> None: |