- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for policy (0.71 sec)
-
tests/test_ws_router.py
with client.websocket_connect("/depends-validate/"): pass # pragma: no cover # the validation error does produce a close message assert e.value.code == status.WS_1008_POLICY_VIOLATION # and no error is leaked assert caught == [] def test_depend_err_middleware(): """ Verify that it is possible to write custom WebSocket middleware to catch errors """
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
fastapi/exception_handlers.py
from starlette.exceptions import HTTPException from starlette.requests import Request from starlette.responses import JSONResponse, Response from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION async def http_exception_handler(request: Request, exc: HTTPException) -> Response: headers = getattr(exc, "headers", None) if not is_body_allowed_for_status_code(exc.status_code):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 1.3K bytes - Viewed (0) -
docs/pl/docs/index.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Apr 29 05:18:04 GMT 2024 - 19.4K bytes - Viewed (0) -
fastapi/exceptions.py
*, websocket: WebSocket, session: Annotated[str | None, Cookie()] = None, item_id: str, ): if session is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) await websocket.accept() while True: data = await websocket.receive_text() await websocket.send_text(f"Session cookie is: {session}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 4.9K bytes - Viewed (0) -
docs/en/docs/release-notes.md
* 馃寪 Fix typo in Russian translation for `docs/ru/docs/tutorial/body-fields.md`. PR [#10224](https://github.com/tiangolo/fastapi/pull/10224) by [@AlertRED](https://github.com/AlertRED). * 馃寪 Add Polish translation for `docs/pl/docs/help-fastapi.md`. PR [#10121](https://github.com/tiangolo/fastapi/pull/10121) by [@romabozhanovgithub](https://github.com/romabozhanovgithub).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1) -
docs/pl/docs/help-fastapi.md
Czy podoba Ci si臋 **FastAPI**? Czy chcia艂by艣 pom贸c FastAPI, jego u偶ytkownikom i autorowi? Mo偶e napotka艂e艣 na trudno艣ci z **FastAPI** i potrzebujesz pomocy? Istnieje kilka bardzo 艂atwych sposob贸w, aby pom贸c (czasami wystarczy jedno lub dwa klikni臋cia). Istnieje r贸wnie偶 kilka sposob贸w uzyskania pomocy. ## Zapisz si臋 do newslettera
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 14.9K bytes - Viewed (0)