Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Content (0.23 sec)

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

    ### `Response`
    
    其他全部的响应都继承自主类 `Response`。
    
    你可以直接返回它。
    
    `Response` 类接受如下参数:
    
    * `content` - 一个 `str` 或者 `bytes`。
    * `status_code` - 一个 `int` 类型的 HTTP 状态码。
    * `headers` - 一个由字符串组成的 `dict`。
    * `media_type` - 一个给出媒体类型的 `str`,比如 `"text/html"`。
    
    FastAPI(实际上是 Starlette)将自动包含 Content-Length 的头。它还将包含一个基于 media_type 的 Content-Type 头,并为文本类型附加一个字符集。
    
    
    ```Python hl_lines="1  18"
    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)
  2. docs/en/docs/advanced/custom-response.md

    You can return it directly.
    
    It accepts the following parameters:
    
    * `content` - A `str` or `bytes`.
    * `status_code` - An `int` HTTP status code.
    * `headers` - A `dict` of strings.
    * `media_type` - A `str` giving the media type. E.g. `"text/html"`.
    
    FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the media_type and appending a charset for text types.
    
    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)
  3. docs/de/docs/advanced/custom-response.md

    Sie akzeptiert die folgenden Parameter:
    
    * `content` – Ein `str` oder `bytes`.
    * `status_code` – Ein `int`-HTTP-Statuscode.
    * `headers` – Ein `dict` von Strings.
    * `media_type` – Ein `str`, der den Medientyp angibt. Z. B. `"text/html"`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  4. docs/ja/docs/advanced/custom-response.md

    メインの `Response` クラスで、他の全てのレスポンスはこれを継承しています。
    
    直接返すことができます。
    
    以下のパラメータを受け付けます。
    
    * `content` - `str` か `bytes`。
    * `status_code` - `int` のHTTPステータスコード。
    * `headers` - 文字列の `dict` 。
    * `media_type` - メディアタイプを示す `str` 。例えば `"text/html"` 。
    
    FastAPI (実際にはStarlette) は自動的にContent-Lengthヘッダーを含みます。また、media_typeに基づいたContent-Typeヘッダーを含み、テキストタイプのためにcharsetを追加します。
    
    ```Python hl_lines="1  18"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 10.7K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/custom-response.md

    ```Python hl_lines="2  7  19"
    {!../../../docs_src/custom_response/tutorial003.py!}
    ```
    
    !!! warning
         `Response` 📨 🔗 👆 *➡ 🛠️ 🔢* 🏆 🚫 📄 🗄 (🖼, `Content-Type` 🏆 🚫 📄) & 🏆 🚫 ⭐ 🏧 🎓 🩺.
    
    !!! info
        ↗️, ☑ `Content-Type` 🎚, 👔 📟, ♒️, 🔜 👟 ⚪️➡️ `Response` 🎚 👆 📨.
    
    ### 📄 🗄 & 🔐 `Response`
    
    🚥 👆 💚 🔐 📨 ⚪️➡️ 🔘 🔢 ✋️ 🎏 🕰 📄 "📻 🆎" 🗄, 👆 💪 ⚙️ `response_class` 🔢 & 📨 `Response` 🎚.
    
    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)
Back to top