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

Function pure_asgi_echo_paths

tests/test_routing.py:1104–1114  ·  view source on GitHub ↗
(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 = {"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
1117echo_paths_routes = [

Callers

nothing calls this directly

Calls 1

sendFunction · 0.70

Tested by

no test coverage detected