- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 97 for websocketjs (0.19 sec)
-
docs/em/docs/advanced/testing-websockets.md
👉, 👆 ⚙️ `TestClient` `with` 📄, 🔗*️⃣: ```Python hl_lines="27-31" {!../../../docs_src/app_testing/tutorial002.py!} ``` !!! note
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 372 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an.py
message = "Message one" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: some-token" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: bar" message = "Message two" websocket.send_text(message)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 3.6K bytes - Viewed (0) -
fastapi/exception_handlers.py
status_code=HTTP_422_UNPROCESSABLE_ENTITY, content={"detail": jsonable_encoder(exc.errors())}, ) async def websocket_request_validation_exception_handler( websocket: WebSocket, exc: WebSocketRequestValidationError ) -> None: await websocket.close( code=WS_1008_POLICY_VIOLATION, reason=jsonable_encoder(exc.errors())
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 1.3K bytes - Viewed (0) -
docs/de/docs/reference/request.md
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Feb 19 15:53:18 GMT 2024 - 596 bytes - Viewed (0) -
docs/de/docs/reference/websockets.md
``` ::: fastapi.WebSocketDisconnect ## WebSockets – zusätzliche Klassen Zusätzliche Klassen für die Handhabung von WebSockets. Werden direkt von Starlette bereitgestellt, Sie können sie jedoch von `fastapi` importieren: ```python from fastapi.websockets import WebSocketDisconnect, WebSocketState ``` ::: fastapi.websockets.WebSocketDisconnect
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 18:16:27 GMT 2024 - 1.8K bytes - Viewed (0) -
docs/em/docs/advanced/websockets.md
```Python hl_lines="2 6-38 41-43" {!../../../docs_src/websockets/tutorial001.py!} ``` ## ✍ `websocket` 👆 **FastAPI** 🈸, ✍ `websocket`: ```Python hl_lines="1 46-47" {!../../../docs_src/websockets/tutorial001.py!} ``` !!! note "📡 ℹ" 👆 💪 ⚙️ `from starlette.websockets import WebSocket`. **FastAPI** 🚚 🎏 `WebSocket` 🔗 🏪 👆, 👩💻. ✋️ ⚫️ 👟 🔗 ⚪️➡️ 💃. ## ⌛ 📧 & 📨 📧
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4.8K bytes - Viewed (0) -
fastapi/dependencies/utils.py
if dependant.request_param_name and isinstance(request, Request): values[dependant.request_param_name] = request elif dependant.websocket_param_name and isinstance(request, WebSocket): values[dependant.websocket_param_name] = request if dependant.background_tasks_param_name: if background_tasks is None: background_tasks = BackgroundTasks()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
docs_src/websockets/tutorial002_py310.py
async def get_cookie_or_token( websocket: WebSocket, session: str | None = Cookie(default=None), token: str | None = Query(default=None), ): if session is None and token is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) return session or token @app.websocket("/items/{item_id}/ws") async def websocket_endpoint( websocket: WebSocket, item_id: str,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.7K bytes - Viewed (0) -
docs/pt/docs/alternatives.md
Ele usa o padrão anterior para frameworks web Python (WSGI) que é síncrono, então ele não pode controlar _WebSockets_ e outros casos de uso. No entanto, ele também tem uma boa performance.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 25.5K bytes - Viewed (0) -
docs/zh/docs/advanced/testing-websockets.md
# 测试 WebSockets 测试 WebSockets 也使用 `TestClient`。 为此,要在 `with` 语句中使用 `TestClient` 连接 WebSocket。 ```Python hl_lines="27-31" {!../../../docs_src/app_testing/tutorial002.py!} ``` !!! note "笔记"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jan 28 18:12:29 GMT 2024 - 418 bytes - Viewed (0)