Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for websocket_endpoint (0.1 sec)

  1. fastapi/exceptions.py

            Cookie,
            FastAPI,
            WebSocket,
            WebSocketException,
            status,
        )
    
        app = FastAPI()
    
        @app.websocket("/items/{item_id}/ws")
        async def websocket_endpoint(
            *,
            websocket: WebSocket,
            session: Annotated[str | None, Cookie()] = None,
            item_id: str,
        ):
            if session is None:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Apr 02 02:48:51 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. fastapi/routing.py

            ```python
            from fastapi import APIRouter, FastAPI, WebSocket
    
            app = FastAPI()
            router = APIRouter()
    
            @router.websocket("/ws")
            async def websocket_endpoint(websocket: WebSocket):
                await websocket.accept()
                while True:
                    data = await websocket.receive_text()
                    await websocket.send_text(f"Message text was: {data}")
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 172.1K bytes
    - Viewed (0)
  3. fastapi/applications.py

            **Example**
    
            ```python
            from fastapi import FastAPI, WebSocket
    
            app = FastAPI()
    
            @app.websocket("/ws")
            async def websocket_endpoint(websocket: WebSocket):
                await websocket.accept()
                while True:
                    data = await websocket.receive_text()
                    await websocket.send_text(f"Message text was: {data}")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:52:31 UTC 2024
    - 172.2K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/websockets.md

    ///
    
    ## 🌅 ℹ
    
    💡 🌅 🔃 🎛, ✅ 💃 🧾:
    
    * <a href="https://www.starlette.io/websockets/" class="external-link" target="_blank"> `WebSocket` 🎓</a>.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/websockets.md

    * <a href="https://www.starlette.io/websockets/" class="external-link" target="_blank">Die `WebSocket`-Klasse</a>.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  6. docs/pt/docs/advanced/websockets.md

    * <a href="https://www.starlette.io/websockets/" class="external-link" target="_blank">A classe `WebSocket`</a>.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:20:59 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/websockets.md

    ///
    
    ## 更多信息
    
    要了解更多选项,请查看 Starlette 的文档:
    
    * [WebSocket 类](https://www.starlette.io/websockets/)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/websockets.md

    * <a href="https://www.starlette.io/websockets/" class="external-link" target="_blank">The `WebSocket` class</a>.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  9. docs/ja/docs/advanced/websockets.md

    ## その他のドキュメント
    
    オプションの詳細については、Starletteのドキュメントを確認してください。
    
    * <a href="https://www.starlette.io/websockets/" class="external-link" target="_blank"> `WebSocket` クラス</a>
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top