MCPcopy Create free account
hub / github.com/encode/starlette / pure_asgi_echo_paths

Function pure_asgi_echo_paths

tests/test_routing.py:1162–1172  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send, name: str)

Source from the content-addressed store, hash-verified

1160
1161
1162async def pure_asgi_echo_paths(scope: Scope, receive: Receive, send: Send, name: str) -> None:
1163 data = {"name": name, "path": scope["path"], "root_path": scope["root_path"]}
1164 content = json.dumps(data).encode("utf-8")
1165 await send(
1166 {
1167 "type": "http.response.start",
1168 "status": 200,
1169 "headers": [(b"content-type", b"application/json")],
1170 }
1171 )
1172 await send({"type": "http.response.body", "body": content})
1173
1174
1175echo_paths_routes = [

Callers

nothing calls this directly

Calls 1

sendFunction · 0.70

Tested by

no test coverage detected