MCPcopy
hub / github.com/encode/starlette / pure_asgi_echo_paths

Function pure_asgi_echo_paths

tests/test_routing.py:1104–1114  ·  tests/test_routing.py::pure_asgi_echo_paths
(scope: Scope, receive: Receive, send: Send, name: str)

Source from the content-addressed store, hash-verified

1102
1103
1104async 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
1117echo_paths_routes = [

Callers

nothing calls this directly

Calls 1

sendFunction · 0.70

Tested by

no test coverage detected