mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-27 08:10:57 -05:00
* 🌐 💬 🩺 🦲 * 🎨 [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>
2.2 KiB
2.2 KiB
📨 💽
🕐❔ 👆 💪 📨 📨 🏑 ↩️ 🎻, 👆 💪 ⚙️ Form.
!!! info
⚙️ 📨, 🥇 ❎ python-multipart.
🤶 Ⓜ. `pip install python-multipart`.
🗄 Form
🗄 Form ⚪️➡️ fastapi:
{!../../../docs_src/request_forms/tutorial001.py!}
🔬 Form 🔢
✍ 📨 🔢 🎏 🌌 👆 🔜 Body ⚖️ Query:
{!../../../docs_src/request_forms/tutorial001.py!}
🖼, 1️⃣ 🌌 Oauth2️⃣ 🔧 💪 ⚙️ (🤙 "🔐 💧") ⚫️ ✔ 📨 username & password 📨 🏑.
🔌 🚚 🏑 ⚫️❔ 📛 username & password, & 📨 📨 🏑, 🚫 🎻.
⏮️ Form 👆 💪 📣 🎏 📳 ⏮️ Body (& Query, Path, Cookie), 🔌 🔬, 🖼, 📛 (✅ user-name ↩️ username), ♒️.
!!! info
Form 🎓 👈 😖 🔗 ⚪️➡️ Body.
!!! tip
📣 📨 💪, 👆 💪 ⚙️ Form 🎯, ↩️ 🍵 ⚫️ 🔢 🔜 🔬 🔢 🔢 ⚖️ 💪 (🎻) 🔢.
🔃 "📨 🏑"
🌌 🕸 📨 (<form></form>) 📨 💽 💽 🛎 ⚙️ "🎁" 🔢 👈 📊, ⚫️ 🎏 ⚪️➡️ 🎻.
FastAPI 🔜 ⚒ 💭 ✍ 👈 📊 ⚪️➡️ ▶️️ 🥉 ↩️ 🎻.
!!! note "📡 ℹ"
📊 ⚪️➡️ 📨 🛎 🗜 ⚙️ "📻 🆎" application/x-www-form-urlencoded.
✋️ 🕐❔ 📨 🔌 📁, ⚫️ 🗜 `multipart/form-data`. 👆 🔜 ✍ 🔃 🚚 📁 ⏭ 📃.
🚥 👆 💚 ✍ 🌖 🔃 👉 🔢 & 📨 🏑, 👳 <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">🏇</abbr> 🕸 🩺 <code>POST</code></a>.
!!! warning
👆 💪 📣 💗 Form 🔢 ➡ 🛠️, ✋️ 👆 💪 🚫 📣 Body 🏑 👈 👆 ⌛ 📨 🎻, 📨 🔜 ✔️ 💪 🗜 ⚙️ application/x-www-form-urlencoded ↩️ application/json.
👉 🚫 🚫 **FastAPI**, ⚫️ 🍕 🇺🇸🔍 🛠️.
🌃
⚙️ Form 📣 📨 💽 🔢 🔢.