MCPcopy Create free account
hub / github.com/fastapi/fastapi / index

Function index

tests/test_ws_router.py:23–26  ·  view source on GitHub ↗
(websocket: WebSocket)

Source from the content-addressed store, hash-verified

21
22@app.websocket_route("/")
23async def index(websocket: WebSocket):
24 await websocket.accept()
25 await websocket.send_text("Hello, world!")
26 await websocket.close()
27
28
29@router.websocket_route("/router")

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected