Files
fastapi/docs/em/docs/tutorial/header-params.md
LeeeeT d4e85da18b 🌐 🔠 📄 🐢 Translate docs to Emoji 🥳 🎉 💥 🤯 🤯 (#5385)
* 🌐 💬  🩺  🦲

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

* 🛠️😊

* ♻️ Rename emoji lang from emj to em, and main docs name as 😉

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Axd1x8a <26704473+FeeeeK@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-04-01 11:26:04 +02:00

129 lines
3.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🎚 🔢
👆 💪 🔬 🎚 🔢 🎏 🌌 👆 🔬 `Query`, `Path` &amp; `Cookie` 🔢.
## 🗄 `Header`
🥇 🗄 `Header`:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="3"
{!> ../../../docs_src/header_params/tutorial001.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="1"
{!> ../../../docs_src/header_params/tutorial001_py310.py!}
```
## 📣 `Header` 🔢
⤴️ 📣 🎚 🔢 ⚙️ 🎏 📊 ⏮️ `Path`, `Query` &amp; `Cookie`.
🥇 💲 🔢 💲, 👆 💪 🚶‍♀️ 🌐 🔬 ⚖️ ✍ 🔢:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial001.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="7"
{!> ../../../docs_src/header_params/tutorial001_py310.py!}
```
!!! note "📡 "
`Header` "👭" 🎓 `Path`, `Query` &amp; `Cookie`. ⚫️ 😖 ⚪️➡️ 🎏 ⚠ `Param` 🎓.
✋️ 💭 👈 🕐❔ 👆 🗄 `Query`, `Path`, `Header`, &amp; 🎏 ⚪️➡️ `fastapi`, 👈 🤙 🔢 👈 📨 🎁 🎓.
!!! info
📣 🎚, 👆 💪 ⚙️ `Header`, ↩️ ⏪ 🔢 🔜 🔬 🔢 🔢.
## 🏧 🛠️
`Header` ✔️ 🐥 🛠️ 🔛 🔝 ⚫️❔ `Path`, `Query` &amp; `Cookie` 🚚.
🌅 🐩 🎚 🎏 "🔠" 🦹, 💭 " 🔣" (`-`).
✋️ 🔢 💖 `user-agent` ❌ 🐍.
, 🔢, `Header` 🔜 🗜 🔢 📛 🦹 ⚪️➡️ 🎦 (`_`) 🔠 (`-`) ⚗ &amp; 📄 🎚.
, 🇺🇸🔍 🎚 💼-😛,, 👆 💪 📣 👫 ⏮️ 🐩 🐍 👗 (💭 "🔡").
, 👆 💪 ⚙️ `user_agent` 👆 🛎 🔜 🐍 📟, ↩️ 💆‍♂ 🎯 🥇 🔤 `User_Agent` ⚖️ 🕳 🎏.
🚥 🤔 👆 💪 ❎ 🏧 🛠️ 🎦 🔠, ⚒ 🔢 `convert_underscores` `Header` `False`:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="10"
{!> ../../../docs_src/header_params/tutorial002.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="8"
{!> ../../../docs_src/header_params/tutorial002_py310.py!}
```
!!! warning
⏭ ⚒ `convert_underscores` `False`, 🐻 🤯 👈 🇺🇸🔍 🗳 &amp; 💽 / ⚙️ 🎚 ⏮️ 🎦.
## ❎ 🎚
⚫️ 💪 📨 ❎ 🎚. 👈 ⛓, 🎏 🎚 ⏮️ 💗 💲.
👆 💪 🔬 👈 💼 ⚙️ 📇 🆎 📄.
👆 🔜 📨 🌐 💲 ⚪️➡️ ❎ 🎚 🐍 `list`.
🖼, 📣 🎚 `X-Token` 👈 💪 😑 🌅 🌘 🕐, 👆 💪 ✍:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial003.py!}
```
=== "🐍 3⃣.9️⃣ &amp; 🔛"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial003_py39.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="7"
{!> ../../../docs_src/header_params/tutorial003_py310.py!}
```
🚥 👆 🔗 ⏮️ 👈 *➡ 🛠️* 📨 2⃣ 🇺🇸🔍 🎚 💖:
```
X-Token: foo
X-Token: bar
```
📨 🔜 💖:
```JSON
{
"X-Token values": [
"bar",
"foo"
]
}
```
## 🌃
📣 🎚 ⏮️ `Header`, ⚙️ 🎏 ⚠ ⚓ `Query`, `Path` &amp; `Cookie`.
&amp; 🚫 😟 🔃 🎦 👆 🔢, **FastAPI** 🔜 ✊ 💅 🏭 👫.