(scope: Scope, receive: Receive, send: Send)
| 88 | |
| 89 | |
| 90 | async def hello_world_json(scope: Scope, receive: Receive, send: Send) -> None: |
| 91 | await send( |
| 92 | { |
| 93 | "type": "http.response.start", |
| 94 | "status": 200, |
| 95 | "headers": [[b"content-type", b"application/json"]], |
| 96 | } |
| 97 | ) |
| 98 | await send({"type": "http.response.body", "body": b'{"Hello": "world!"}'}) |
| 99 | |
| 100 | |
| 101 | async def slow_response(scope: Scope, receive: Receive, send: Send) -> None: |