- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for HTTPException (0.95 sec)
-
docs/ja/docs/tutorial/handling-errors.md
} } ``` #### FastAPIの`HTTPException`とStarletteの`HTTPException` **FastAPI**は独自の`HTTPException`を持っています。 また、 **FastAPI**のエラークラス`HTTPException`はStarletteのエラークラス`HTTPException`を継承しています。 唯一の違いは、**FastAPI** の`HTTPException`はレスポンスに含まれるヘッダを追加できることです。 これはOAuth 2.0といくつかのセキュリティユーティリティのために内部的に必要とされ、使用されています。 そのため、コード内では通常通り **FastAPI** の`HTTPException`を発生させ続けることができます。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.8K bytes - Viewed (0) -
fastapi/security/http.py
if self.auto_error: raise HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers=unauthorized_headers, ) else: return None invalid_user_credentials_exc = HTTPException( status_code=HTTP_401_UNAUTHORIZED,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 15:29:38 GMT 2024 - 13.2K bytes - Viewed (0) -
fastapi/security/oauth2.py
from typing import Any, Dict, List, Optional, Union, cast from fastapi.exceptions import HTTPException from fastapi.openapi.models import OAuth2 as OAuth2Model from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel from fastapi.param_functions import Form from fastapi.security.base import SecurityBase from fastapi.security.utils import get_authorization_scheme_param from starlette.requests import Request
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 21.1K bytes - Viewed (1) -
docs/em/docs/advanced/security/oauth2-scopes.md
⚫️ 🔜 ✔️ 🏠 `scopes` ⏮️ 📇 ⚗ 🌐 ↔ ✔ ⚫️ & 🌐 🔗 👈 ⚙️ 👉 🎧-🔗. 👈 ⛓, 🌐 "⚓️"... 👉 💪 🔊 😨, ⚫️ 🔬 🔄 ⏪ 🔛. `security_scopes` 🎚 (🎓 `SecurityScopes`) 🚚 `scope_str` 🔢 ⏮️ 👁 🎻, 🔌 👈 ↔ 👽 🚀 (👥 🔜 ⚙️ ⚫️). 👥 ✍ `HTTPException` 👈 👥 💪 🏤-⚙️ (`raise`) ⏪ 📚 ☝. 👉 ⚠, 👥 🔌 ↔ 🚚 (🚥 🙆) 🎻 👽 🚀 (⚙️ `scope_str`). 👥 🚮 👈 🎻 ⚗ ↔ `WWW-Authenticate` 🎚 (👉 🍕 🔌). ```Python hl_lines="105 107-115" {!../../../docs_src/security/tutorial005.py!}
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 11.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/handling-errors.md
"title": "towel", "size": "XL" } } ``` #### O `HTTPException` do FastAPI vs o `HTTPException` do Starlette. O **FastAPI** tem o seu próprio `HTTPException`. E a classe de erro `HTTPException` do **FastAPI** herda da classe de erro do `HTTPException` do Starlette. A diferença entre os dois é a de que o `HTTPException` do **FastAPI** permite que você adicione *headers* que serão incluídos nas *responses*.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** uses them internally to achieve this. ## Dependencies with `yield` and `HTTPException` You saw that you can use dependencies with `yield` and have `try` blocks that catch exceptions. The same way, you could raise an `HTTPException` or similar in the exit code, after the `yield`. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/de/docs/tutorial/handling-errors.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:29 GMT 2024 - 10.6K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** はこれを実現するために内部的に使用しています。 ## `yield`と`HTTPException`を持つ依存関係 `yield`と例外をキャッチする`try`ブロックを持つことができる依存関係を使用することができることがわかりました。 `yield`の後の終了コードで`HTTPException`などを発生させたくなるかもしれません。しかし**それはうまくいきません** `yield`を持つ依存関係の終了コードは[例外ハンドラ](../handling-errors.md#_4){.internal-link target=_blank}の*後に*実行されます。依存関係によって投げられた例外を終了コード(`yield`の後)でキャッチするものはなにもありません。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 12.5K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** verwendet sie intern, um das zu erreichen. ## Abhängigkeiten mit `yield` und `HTTPException`. Sie haben gesehen, dass Ihre Abhängigkeiten `yield` verwenden können und `try`-Blöcke haben können, die Exceptions abfangen. Auf die gleiche Weise könnten Sie im Exit-Code nach dem `yield` eine `HTTPException` oder ähnliches auslösen. !!! tip "Tipp"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:10:29 GMT 2024 - 13.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Помните ли ошибки **"404 Not Found "** (и шутки) ? ## Использование `HTTPException` Для возврата клиенту HTTP-ответов с ошибками используется `HTTPException`. ### Импортируйте `HTTPException` ```Python hl_lines="1" {!../../../docs_src/handling_errors/tutorial001.py!} ``` ### Вызовите `HTTPException` в своем коде `HTTPException` - это обычное исключение Python с дополнительными данными, актуальными для API.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.5K bytes - Viewed (0)