(scope: Scope, receive: Receive, send: Send)
| 57 | |
| 58 | |
| 59 | async def app(scope: Scope, receive: Receive, send: Send) -> None: |
| 60 | assert scope["type"] == "http" |
| 61 | if scope["path"].startswith("/slow_response"): |
| 62 | await slow_response(scope, receive, send) |
| 63 | elif scope["path"].startswith("/status"): |
| 64 | await status_code(scope, receive, send) |
| 65 | elif scope["path"].startswith("/echo_body"): |
| 66 | await echo_body(scope, receive, send) |
| 67 | elif scope["path"].startswith("/echo_binary"): |
| 68 | await echo_binary(scope, receive, send) |
| 69 | elif scope["path"].startswith("/echo_headers"): |
| 70 | await echo_headers(scope, receive, send) |
| 71 | elif scope["path"].startswith("/redirect_301"): |
| 72 | await redirect_301(scope, receive, send) |
| 73 | elif scope["path"].startswith("/json"): |
| 74 | await hello_world_json(scope, receive, send) |
| 75 | else: |
| 76 | await hello_world(scope, receive, send) |
| 77 | |
| 78 | |
| 79 | async def hello_world(scope: Scope, receive: Receive, send: Send) -> None: |
nothing calls this directly
no test coverage detected