- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,676 for response (0.18 sec)
-
docs/zh/docs/advanced/custom-response.md
!!! info "提示" 当然,实际的 `Content-Type` 头,状态码等等,将来自于你返回的 `Response` 对象。 ### OpenAPI 中的文档和重载 `Response` 如果你想要在函数内重载响应,但是同时在 OpenAPI 中文档化「媒体类型」,你可以使用 `response_class` 参数并返回一个 `Response` 对象。 接着 `response_class` 参数只会被用来文档化 OpenAPI 的 *路径操作*,你的 `Response` 用来返回响应。 ### 直接返回 `HTMLResponse` 比如像这样: ```Python hl_lines="7 23 21"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 7.8K bytes - Viewed (1) -
docs/zh/docs/advanced/response-headers.md
你也可以在直接返回`Response`时添加头部。 按照[直接返回响应](response-directly.md){.internal-link target=_blank}中所述创建响应,并将头部作为附加参数传递: ```Python hl_lines="10-12" {!../../../docs_src/response_headers/tutorial001.py!} ``` !!! note "技术细节" 你也可以使用`from starlette.responses import Response`或`from starlette.responses import JSONResponse`。 **FastAPI**提供了与`fastapi.responses`相同的`starlette.responses`,只是为了方便开发者。但是,大多数可用的响应都直接来自Starlette。
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 2K bytes - Viewed (0) -
docs/fr/docs/advanced/response-directly.md
```Python hl_lines="6-7 21-22" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "Détails techniques" Vous pouvez aussi utiliser `from starlette.responses import JSONResponse`.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.6K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
Of course, the actual `Content-Type` header, status code, etc, will come from the `Response` object you returned. ### Document in OpenAPI and override `Response` If you want to override the response from inside of the function but at the same time document the "media type" in OpenAPI, you can use the `response_class` parameter AND return a `Response` object.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.7K bytes - Viewed (0) -
docs/zh/docs/advanced/response-cookies.md
## 直接响应 `Response` 你还可以在直接响应`Response`时直接创建cookies。 你可以参考[Return a Response Directly](response-directly.md){.internal-link target=_blank}来创建response 然后设置Cookies,并返回: ```Python hl_lines="10-12" {!../../../docs_src/response_cookies/tutorial001.py!} ``` !!! tip 需要注意,如果你直接反馈一个response对象,而不是使用`Response`入参,FastAPI则会直接反馈你封装的response对象。 所以你需要确保你响应数据类型的正确性,如:你可以使用`JSONResponse`来兼容JSON的场景。
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Aug 18 16:09:38 GMT 2022 - 2.1K bytes - Viewed (0) -
docs/en/docs/advanced/response-headers.md
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 2.2K bytes - Viewed (0) -
docs/en/docs/advanced/response-directly.md
```Python hl_lines="6-7 21-22" {!../../../docs_src/response_directly/tutorial001.py!} ``` !!! note "Technical Details" You could also use `from starlette.responses import JSONResponse`. **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 29 14:02:58 GMT 2020 - 3K bytes - Viewed (0) -
docs/ko/docs/tutorial/response-model.md
```Python hl_lines="9 11 16" {!../../../docs_src/response_model/tutorial003.py!} ``` 여기서 *경로 작동 함수*가 비밀번호를 포함하는 동일한 입력 사용자를 반환할지라도: ```Python hl_lines="24" {!../../../docs_src/response_model/tutorial003.py!} ``` ...`response_model`을 `UserOut` 모델로 선언했기 때문에 비밀번호를 포함하지 않습니다: ```Python hl_lines="22" {!../../../docs_src/response_model/tutorial003.py!} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.2K bytes - Viewed (0) -
docs/em/docs/advanced/custom-response.md
#### 📨 `HTMLResponse` 🔗 🖼, ⚫️ 💪 🕳 💖: ```Python hl_lines="7 21 23" {!../../../docs_src/custom_response/tutorial004.py!} ``` 👉 🖼, 🔢 `generate_html_response()` ⏪ 🏗 & 📨 `Response` ↩️ 🛬 🕸 `str`. 🛬 🏁 🤙 `generate_html_response()`, 👆 ⏪ 🛬 `Response` 👈 🔜 🔐 🔢 **FastAPI** 🎭. ✋️ 👆 🚶♀️ `HTMLResponse` `response_class` 💁♂️, **FastAPI** 🔜 💭 ❔ 📄 ⚫️ 🗄 & 🎓 🩺 🕸 ⏮️ `text/html`:
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 9.8K bytes - Viewed (0) -
docs/em/docs/advanced/response-directly.md
⚫️ 💪 ⚠, 🖼, 📨 🛃 🎚 ⚖️ 🍪. ## 📨 `Response` 👐, 👆 💪 📨 🙆 `Response` ⚖️ 🙆 🎧-🎓 ⚫️. !!! tip `JSONResponse` ⚫️ 🎧-🎓 `Response`. & 🕐❔ 👆 📨 `Response`, **FastAPI** 🔜 🚶♀️ ⚫️ 🔗. ⚫️ 🏆 🚫 🙆 💽 🛠️ ⏮️ Pydantic 🏷, ⚫️ 🏆 🚫 🗜 🎚 🙆 🆎, ♒️. 👉 🤝 👆 📚 💪. 👆 💪 📨 🙆 📊 🆎, 🔐 🙆 💽 📄 ⚖️ 🔬, ♒️. ## ⚙️ `jsonable_encoder` `Response`
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 2.6K bytes - Viewed (0)