(scope: Scope, receive: Receive, send: Send)
| 77 | |
| 78 | |
| 79 | async def hello_world(scope: Scope, receive: Receive, send: Send) -> None: |
| 80 | await send( |
| 81 | { |
| 82 | "type": "http.response.start", |
| 83 | "status": 200, |
| 84 | "headers": [[b"content-type", b"text/plain"]], |
| 85 | } |
| 86 | ) |
| 87 | await send({"type": "http.response.body", "body": b"Hello, world!"}) |
| 88 | |
| 89 | |
| 90 | async def hello_world_json(scope: Scope, receive: Receive, send: Send) -> None: |