- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 272 for cookie2 (0.07 sec)
-
docs/de/docs/tutorial/header-params.md
# Header-Parameter So wie `Query`-, `Path`-, und `Cookie`-Parameter können Sie auch <abbr title='Header – Kopfzeilen, Header, Header-Felder: Schlüssel-Wert-Metadaten, die vom Client beim Request, und vom Server bei der Response gesendet werden'>Header</abbr>-Parameter definieren. ## `Header` importieren Importieren Sie zuerst `Header`: //// tab | Python 3.10+ ```Python hl_lines="3" {!> ../../docs_src/header_params/tutorial001_an_py310.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/header-params.md
``` //// /// note | "技术细节" `Header` 是 `Path`、`Query`、`Cookie` 的**兄弟类**,都继承自共用的 `Param` 类。 注意,从 `fastapi` 导入的 `Query`、`Path`、`Header` 等对象,实际上是返回特殊类的函数。 /// /// info | "说明" 必须使用 `Header` 声明 header 参数,否则该参数会被解释为查询参数。 /// ## 自动转换 `Header` 比 `Path`、`Query` 和 `Cookie` 提供了更多功能。 大部分标准请求头用**连字符**分隔,即**减号**(`-`)。 但是 `user-agent` 这样的变量在 Python 中是无效的。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs_src/dependencies/tutorial005_py310.py
from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: str = Depends(query_extractor), last_query: str | None = Cookie(default=None) ): if not q: return last_query return q @app.get("/items/") async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 443 bytes - Viewed (0) -
docs_src/dependencies/tutorial005.py
from typing import Union from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: str = Depends(query_extractor), last_query: Union[str, None] = Cookie(default=None), ): if not q: return last_query return q @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 486 bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an_py310.py
from typing import Annotated from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[str | None, Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 510 bytes - Viewed (0) -
docs_src/cookie_params/tutorial001_py310.py
from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: str | None = Cookie(default=None)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 170 bytes - Viewed (0) -
docs/ja/docs/tutorial/header-params.md
# ヘッダーのパラメータ ヘッダーのパラメータは、`Query`や`Path`、`Cookie`のパラメータを定義するのと同じように定義できます。 ## `Header`をインポート まず、`Header`をインポートします: ```Python hl_lines="3" {!../../docs_src/header_params/tutorial001.py!} ``` ## `Header`のパラメータの宣言 次に、`Path`や`Query`、`Cookie`と同じ構造を用いてヘッダーのパラメータを宣言します。 最初の値がデフォルト値で、追加の検証パラメータや注釈パラメータをすべて渡すことができます。 ```Python hl_lines="9" {!../../docs_src/header_params/tutorial001.py!} ``` /// note | "技術詳細"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.8K bytes - Viewed (0) -
docs_src/cookie_params/tutorial001.py
from typing import Union from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Union[str, None] = Cookie(default=None)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 202 bytes - Viewed (0) -
docs/nl/docs/features.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 03 13:50:38 UTC 2024 - 10.1K bytes - Viewed (0) -
docs/vi/docs/index.md
* JSON. * Các tham số trong đường dẫn. * Các tham số trong query string. * Cookies. * Headers. * Forms. * Files. * <abbr title="cũng được biết tới như: serialization, parsing, marshalling">Chuyển đổi</abbr> dữ liệu đầu ra: chuyển đổi từ kiểu dữ liệu Python sang dữ liệu network (như JSON):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 21.9K bytes - Viewed (0)