(scope: Scope, receive: Receive, send: Send, name: str)
| 1102 | |
| 1103 | |
| 1104 | async def pure_asgi_echo_paths(scope: Scope, receive: Receive, send: Send, name: str) -> None: |
| 1105 | data = {"name": name, "path": scope["path"], "root_path": scope["root_path"]} |
| 1106 | content = json.dumps(data).encode("utf-8") |
| 1107 | await send( |
| 1108 | { |
| 1109 | "type": "http.response.start", |
| 1110 | "status": 200, |
| 1111 | "headers": [(b"content-type", b"application/json")], |
| 1112 | } |
| 1113 | ) |
| 1114 | await send({"type": "http.response.body", "body": content}) |
| 1115 | |
| 1116 | |
| 1117 | echo_paths_routes = [ |