Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for HTMLResponse (0.2 sec)

  1. docs/zh/docs/advanced/custom-response.md

        并且在 OpenAPI 文档中也会这样记录。
    
    !!! tip "小贴士"
        `ORJSONResponse` 目前只在 FastAPI 中可用,而在 Starlette 中不可用。
    
    
    
    ## HTML 响应
    
    使用 `HTMLResponse` 来从 **FastAPI** 中直接返回一个 HTML 响应。
    
    * 导入 `HTMLResponse`。
    * 将 `HTMLResponse` 作为你的 *路径操作* 的 `response_class` 参数传入。
    
    ```Python hl_lines="2 7"
    {!../../../docs_src/custom_response/tutorial002.py!}
    ```
    
    !!! info "提示"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 7.8K bytes
    - Viewed (1)
  2. docs/en/docs/advanced/custom-response.md

    !!! tip
        The `ORJSONResponse` is currently only available in FastAPI, not in Starlette.
    
    ## HTML Response
    
    To return a response with HTML directly from **FastAPI**, use `HTMLResponse`.
    
    * Import `HTMLResponse`.
    * Pass `HTMLResponse` as the parameter `response_class` of your *path operation decorator*.
    
    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial002.py!}
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/custom-response.md

        Die `ORJSONResponse` ist derzeit nur in FastAPI verfügbar, nicht in Starlette.
    
    ## HTML-Response
    
    Um eine Response mit HTML direkt von **FastAPI** zurückzugeben, verwenden Sie `HTMLResponse`.
    
    * Importieren Sie `HTMLResponse`.
    * Übergeben Sie `HTMLResponse` als den Parameter `response_class` Ihres *Pfadoperation-Dekorators*.
    
    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial002.py!}
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/custom-response.md

         & ⚫️ 🔜 📄 ✅ 🗄.
    
    !!! tip
         `ORJSONResponse` ⏳ 🕴 💪 FastAPI, 🚫 💃.
    
    ## 🕸 📨
    
    📨 📨 ⏮️ 🕸 🔗 ⚪️➡️ **FastAPI**, ⚙️ `HTMLResponse`.
    
    * 🗄 `HTMLResponse`.
    * 🚶‍♀️ `HTMLResponse` 🔢 `response_class` 👆 *➡ 🛠️ 👨‍🎨*.
    
    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial002.py!}
    ```
    
    !!! info
        🔢 `response_class` 🔜 ⚙️ 🔬 "📻 🆎" 📨.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  5. docs/en/docs/reference/responses.md

    You can import them directly from `fastapi.responses`:
    
    ```python
    from fastapi.responses import (
        FileResponse,
        HTMLResponse,
        JSONResponse,
        ORJSONResponse,
        PlainTextResponse,
        RedirectResponse,
        Response,
        StreamingResponse,
        UJSONResponse,
    )
    ```
    
    ## FastAPI Responses
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  6. docs/ja/docs/advanced/custom-response.md

        そして、OpenAPIにはそのようにドキュメントされます。
    
    !!! tip "豆知識"
        `ORJSONResponse` は、現在はFastAPIのみで利用可能で、Starletteでは利用できません。
    
    ## HTMLレスポンス
    
    **FastAPI** からHTMLを直接返す場合は、`HTMLResponse` を使います。
    
    * `HTMLResponse` をインポートする。
    * *path operation* のパラメータ `content_type` に `HTMLResponse` を渡す。
    
    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial002.py!}
    ```
    
    !!! info "情報"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 10.7K bytes
    - Viewed (0)
  7. docs/de/docs/reference/responses.md

    Sie können diese direkt von `fastapi.responses` importieren:
    
    ```python
    from fastapi.responses import (
        FileResponse,
        HTMLResponse,
        JSONResponse,
        ORJSONResponse,
        PlainTextResponse,
        RedirectResponse,
        Response,
        StreamingResponse,
        UJSONResponse,
    )
    ```
    
    ## FastAPI-Responses
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/templates.md

        Além disso, em versões anteriores, o objeto `request` era passado como parte dos pares chave-valor no "context" dict para o Jinja2.
    
    
    !!! tip "Dica"
        Ao declarar `response_class=HTMLResponse`, a documentação entenderá que a resposta será HTML.
    
    
    !!! note "Detalhes Técnicos"
        Você também poderia usar `from starlette.templating import Jinja2Templates`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 28 04:05:17 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/templates.md

    ```Python hl_lines="4  11  15-16"
    {!../../../docs_src/templates/tutorial001.py!}
    ```
    
    !!! note "笔记"
    
        注意,必须为 Jinja2 以键值对方式在上下文中传递 `request`。因此,还要在*路径操作*中声明。
    
    !!! tip "提示"
    
        通过声明 `response_class=HTMLResponse`,API 文档就能识别响应的对象是 HTML。
    
    !!! note "技术细节"
    
        您还可以使用 `from starlette.templating import Jinja2Templates`。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:45:16 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/templates.md

        Außerdem wurde in früheren Versionen das `request`-Objekt als Teil der Schlüssel-Wert-Paare im Kontext für Jinja2 übergeben.
    
    !!! tip "Tipp"
        Durch die Deklaration von `response_class=HTMLResponse` kann die Dokumentationsoberfläche erkennen, dass die Response HTML sein wird.
    
    !!! note "Technische Details"
        Sie können auch `from starlette.templating import Jinja2Templates` verwenden.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
Back to top