- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 12 for WebSocketException (0.13 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
fastapi/exceptions.py
from typing import Annotated, Any, TypedDict from annotated_doc import Doc from pydantic import BaseModel, create_model from starlette.exceptions import HTTPException as StarletteHTTPException from starlette.exceptions import WebSocketException as StarletteWebSocketException class EndpointContext(TypedDict, total=False): function: str path: str file: str line: int class HTTPException(StarletteHTTPException): """
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:41:21 GMT 2026 - 7.3K bytes - Click Count (0) -
docs_src/websockets_/tutorial002_py310.py
from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 12:34:37 GMT 2026 - 2.7K bytes - Click Count (0) -
docs_src/websockets_/tutorial002_an_py310.py
from typing import Annotated from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 12:34:37 GMT 2026 - 2.8K bytes - Click Count (0) -
docs/zh/docs/advanced/websockets.md
* `Path` * `Query` 它们的工作方式与其他 FastAPI 端点/*路径操作* 相同: {* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info 由于这是一个 WebSocket,抛出 `HTTPException` 并不是很合理,而是抛出 `WebSocketException`。 您可以使用[规范中定义的有效代码](https://tools.ietf.org/html/rfc6455#section-7.4.1)。 /// ### 尝试带有依赖项的 WebSockets { #try-the-websockets-with-dependencies } 运行你的应用程序: <div class="termy">Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 5.4K bytes - Click Count (0) -
docs/en/docs/advanced/websockets.md
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info As this is a WebSocket it doesn't really make sense to raise an `HTTPException`, instead we raise a `WebSocketException`. You can use a closing code from the [valid codes defined in the specification](https://tools.ietf.org/html/rfc6455#section-7.4.1). ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 07 09:29:03 GMT 2026 - 5.3K bytes - Click Count (0) -
docs/ja/docs/advanced/websockets.md
これらは、他のFastAPI エンドポイント/*path operations* の場合と同じように機能します。 {* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info | 情報 これはWebSocketであるため、`HTTPException` を発生させることはあまり意味がありません。代わりに `WebSocketException` を発生させます。 クロージングコードは、[仕様で定義された有効なコード](https://tools.ietf.org/html/rfc6455#section-7.4.1)の中から使用することができます。 /// ### 依存関係を用いてWebSocketsを試してみる { #try-the-websockets-with-dependencies } アプリケーションを実行します。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 6.8K bytes - Click Count (0) -
docs/pt/docs/advanced/websockets.md
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info | Informação Como isso é um WebSocket, não faz muito sentido levantar uma `HTTPException`, em vez disso levantamos uma `WebSocketException`. Você pode usar um código de fechamento dos [códigos válidos definidos na especificação](https://tools.ietf.org/html/rfc6455#section-7.4.1). ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 5.6K bytes - Click Count (0) -
docs/tr/docs/advanced/websockets.md
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info Bu bir WebSocket olduğu için `HTTPException` raise etmek pek anlamlı değildir; bunun yerine `WebSocketException` raise ederiz. [Spesifikasyonda tanımlanan geçerli kodlar](https://tools.ietf.org/html/rfc6455#section-7.4.1) arasından bir kapatma kodu kullanabilirsiniz. ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 5.9K bytes - Click Count (0) -
docs/ru/docs/advanced/websockets.md
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info | Примечание В веб-сокете вызывать `HTTPException` не имеет смысла. Вместо этого нужно использовать `WebSocketException`. Вы можете использовать код закрытия из [допустимых кодов, определённых в спецификации](https://tools.ietf.org/html/rfc6455#section-7.4.1). ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/fr/docs/advanced/websockets.md
{* ../../docs_src/websockets_/tutorial002_an_py310.py hl[68:69,82] *} /// info Comme il s'agit d'un WebSocket, il n'est pas vraiment logique de lever une `HTTPException`, nous levons plutôt une `WebSocketException`. Vous pouvez utiliser un code de fermeture parmi les [codes valides définis dans la spécification](https://tools.ietf.org/html/rfc6455#section-7.4.1). ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 5.9K bytes - Click Count (0)