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

Method async_ws_endpoint

tests/test_routing.py:69–72  ·  view source on GitHub ↗
(cls, websocket: WebSocket)

Source from the content-addressed store, hash-verified

67
68 @classmethod
69 async def async_ws_endpoint(cls, websocket: WebSocket) -> None:
70 await websocket.accept()
71 await websocket.send_json({"url": str(websocket.url)})
72 await websocket.close()
73
74
75def func_homepage(request: Request) -> Response:

Callers

nothing calls this directly

Calls 3

acceptMethod · 0.80
send_jsonMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected