Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for DEFAULT (0.16 sec)

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

    ## Default response class
    
    When creating a **FastAPI** class instance or an `APIRouter` you can specify which response class to use by default.
    
    The parameter that defines this is `default_response_class`.
    
    In the example below, **FastAPI** will use `ORJSONResponse` by default, in all *path operations*, instead of `JSONResponse`.
    
    ```Python hl_lines="2  4"
    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)
  2. docs/de/docs/advanced/custom-response.md

    ## Standard-Response-Klasse
    
    Beim Erstellen einer **FastAPI**-Klasseninstanz oder eines `APIRouter`s können Sie angeben, welche Response-Klasse standardmäßig verwendet werden soll.
    
    Der Parameter, der das definiert, ist `default_response_class`.
    
    Im folgenden Beispiel verwendet **FastAPI** standardmäßig `ORJSONResponse` in allen *Pfadoperationen*, anstelle von `JSONResponse`.
    
    ```Python hl_lines="2  4"
    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)
  3. docs/ja/docs/advanced/custom-response.md

    ```Python hl_lines="2  10"
    {!../../../docs_src/custom_response/tutorial009.py!}
    ```
    
    ## デフォルトレスポンスクラス
    
    **FastAPI** クラスのインスタンスか `APIRouter` を生成するときに、デフォルトのレスポンスクラスを指定できます。
    
    定義するためのパラメータは、 `default_response_class` です。
    
    以下の例では、 **FastAPI** は、全ての *path operation* で `JSONResponse` の代わりに `ORJSONResponse` をデフォルトとして利用します。
    
    ```Python hl_lines="2  4"
    {!../../../docs_src/custom_response/tutorial010.py!}
    ```
    
    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)
  4. docs/em/docs/advanced/custom-response.md

    ```json
    {
      "message": "Hello World"
    }
    ```
    
    ↗️, 👆 🔜 🎲 🔎 🌅 👍 🌌 ✊ 📈 👉 🌘 ❕ 🎻. 👶
    
    ## 🔢 📨 🎓
    
    🕐❔ 🏗 **FastAPI** 🎓 👐 ⚖️ `APIRouter` 👆 💪 ✔ ❔ 📨 🎓 ⚙️ 🔢.
    
    🔢 👈 🔬 👉 `default_response_class`.
    
    🖼 🔛, **FastAPI** 🔜 ⚙️ `ORJSONResponse` 🔢, 🌐 *➡ 🛠️*, ↩️ `JSONResponse`.
    
    ```Python hl_lines="2  4"
    {!../../../docs_src/custom_response/tutorial010.py!}
    ```
    
    !!! tip
    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)
Back to top