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