* 🌐 💬 🩺 🦲 * 🎨 [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>
3.2 KiB
🎚 🔢
👆 💪 🔬 🎚 🔢 🎏 🌌 👆 🔬 Query, Path & Cookie 🔢.
🗄 Header
🥇 🗄 Header:
=== "🐍 3️⃣.6️⃣ & 🔛"
```Python hl_lines="3"
{!> ../../../docs_src/header_params/tutorial001.py!}
```
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
```Python hl_lines="1"
{!> ../../../docs_src/header_params/tutorial001_py310.py!}
```
📣 Header 🔢
⤴️ 📣 🎚 🔢 ⚙️ 🎏 📊 ⏮️ Path, Query & Cookie.
🥇 💲 🔢 💲, 👆 💪 🚶♀️ 🌐 ➕ 🔬 ⚖️ ✍ 🔢:
=== "🐍 3️⃣.6️⃣ & 🔛"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial001.py!}
```
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
```Python hl_lines="7"
{!> ../../../docs_src/header_params/tutorial001_py310.py!}
```
!!! note "📡 ℹ"
Header "👭" 🎓 Path, Query & Cookie. ⚫️ 😖 ⚪️➡️ 🎏 ⚠ Param 🎓.
✋️ 💭 👈 🕐❔ 👆 🗄 `Query`, `Path`, `Header`, & 🎏 ⚪️➡️ `fastapi`, 👈 🤙 🔢 👈 📨 🎁 🎓.
!!! info
📣 🎚, 👆 💪 ⚙️ Header, ↩️ ⏪ 🔢 🔜 🔬 🔢 🔢.
🏧 🛠️
Header ✔️ 🐥 ➕ 🛠️ 🔛 🔝 ⚫️❔ Path, Query & Cookie 🚚.
🌅 🐩 🎚 🎏 "🔠" 🦹, 💭 "➖ 🔣" (-).
✋️ 🔢 💖 user-agent ❌ 🐍.
, 🔢, Header 🔜 🗜 🔢 📛 🦹 ⚪️➡️ 🎦 (_) 🔠 (-) ⚗ & 📄 🎚.
, 🇺🇸🔍 🎚 💼-😛,, 👆 💪 📣 👫 ⏮️ 🐩 🐍 👗 (💭 "🔡").
, 👆 💪 ⚙️ user_agent 👆 🛎 🔜 🐍 📟, ↩️ 💆♂ 🎯 🥇 🔤 User_Agent ⚖️ 🕳 🎏.
🚥 🤔 👆 💪 ❎ 🏧 🛠️ 🎦 🔠, ⚒ 🔢 convert_underscores Header False:
=== "🐍 3️⃣.6️⃣ & 🔛"
```Python hl_lines="10"
{!> ../../../docs_src/header_params/tutorial002.py!}
```
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
```Python hl_lines="8"
{!> ../../../docs_src/header_params/tutorial002_py310.py!}
```
!!! warning
⏭ ⚒ convert_underscores False, 🐻 🤯 👈 🇺🇸🔍 🗳 & 💽 / ⚙️ 🎚 ⏮️ 🎦.
❎ 🎚
⚫️ 💪 📨 ❎ 🎚. 👈 ⛓, 🎏 🎚 ⏮️ 💗 💲.
👆 💪 🔬 👈 💼 ⚙️ 📇 🆎 📄.
👆 🔜 📨 🌐 💲 ⚪️➡️ ❎ 🎚 🐍 list.
🖼, 📣 🎚 X-Token 👈 💪 😑 🌅 🌘 🕐, 👆 💪 ✍:
=== "🐍 3️⃣.6️⃣ & 🔛"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial003.py!}
```
=== "🐍 3️⃣.9️⃣ & 🔛"
```Python hl_lines="9"
{!> ../../../docs_src/header_params/tutorial003_py39.py!}
```
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛"
```Python hl_lines="7"
{!> ../../../docs_src/header_params/tutorial003_py310.py!}
```
🚥 👆 🔗 ⏮️ 👈 ➡ 🛠️ 📨 2️⃣ 🇺🇸🔍 🎚 💖:
X-Token: foo
X-Token: bar
📨 🔜 💖:
{
"X-Token values": [
"bar",
"foo"
]
}
🌃
📣 🎚 ⏮️ Header, ⚙️ 🎏 ⚠ ⚓ Query, Path & Cookie.
& 🚫 😟 🔃 🎦 👆 🔢, FastAPI 🔜 ✊ 💅 🏭 👫.