Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Warning (0.2 sec)

  1. docs/em/docs/advanced/additional-status-codes.md

    🏆 👈, 🗄 `JSONResponse`, & 📨 👆 🎚 📤 🔗, ⚒ `status_code` 👈 👆 💚:
    
    ```Python hl_lines="4  25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    ```
    
    !!! warning
        🕐❔ 👆 📨 `Response` 🔗, 💖 🖼 🔛, ⚫️ 🔜 📨 🔗.
    
        ⚫️ 🏆 🚫 🎻 ⏮️ 🏷, ♒️.
    
        ⚒ 💭 ⚫️ ✔️ 📊 👆 💚 ⚫️ ✔️, & 👈 💲 ☑ 🎻 (🚥 👆 ⚙️ `JSONResponse`).
    
    !!! note "📡 ℹ"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/additional-status-codes.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="4  25"
        {!> ../../../docs_src/additional_status_codes/tutorial001.py!}
        ```
    
    !!! warning
        When you return a `Response` directly, like in the example above, it will be returned directly.
    
        It won't be serialized with a model, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/additional-status-codes.md

    但是你也希望它能够接受新的条目。并且当这些条目不存在时,会自动创建并返回 201 「创建」的 HTTP 状态码。
    
    要实现它,导入 `JSONResponse`,然后在其中直接返回你的内容,并将 `status_code` 设置为为你要的值。
    
    ```Python hl_lines="4  25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    ```
    
    !!! warning "警告"
        当你直接返回一个像上面例子中的 `Response` 对象时,它会直接返回。
    
        FastAPI 不会用模型等对该响应进行序列化。
    
        确保其中有你想要的数据,且返回的值为合法的 JSON(如果你使用 `JSONResponse` 的话)。
    
    !!! note "技术细节"
        你也可以使用 `from starlette.responses import JSONResponse`。 
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.8K bytes
    - Viewed (0)
  4. docs/es/docs/advanced/additional-status-codes.md

    Para conseguir esto importa `JSONResponse` y devuelve ahí directamente tu contenido, asignando el `status_code` que quieras:
    
    ```Python hl_lines="4  25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    ```
    
    !!! warning "Advertencia"
        Cuando devuelves directamente una `Response`, como en los ejemplos anteriores, será devuelta directamente.
    
        No será serializado con el modelo, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 11:57:27 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  5. docs/ja/docs/advanced/additional-status-codes.md

    しかし、新しいitemも許可したいです。itemが存在しない場合は、それらを作成して201 "Created"を返します。
    
    これを達成するには、 `JSONResponse` をインポートし、 `status_code` を設定して直接内容を返します。
    
    ```Python hl_lines="4  25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    ```
    
    !!! warning "注意"
        上記の例のように `Response` を明示的に返す場合、それは直接返されます。
    
        モデルなどはシリアライズされません。
    
        必要なデータが含まれていることや、値が有効なJSONであること (`JSONResponse` を使う場合) を確認してください。
    
    !!! note "技術詳細"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  6. docs/fr/docs/advanced/additional-status-codes.md

    ```Python hl_lines="4 25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    ```
    
    !!! warning "Attention"
        Lorsque vous renvoyez une `Response` directement, comme dans l'exemple ci-dessus, elle sera renvoyée directement.
    
        Elle ne sera pas sérialisée avec un modèle.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/additional-status-codes.md

        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="4  25"
        {!> ../../../docs_src/additional_status_codes/tutorial001.py!}
        ```
    
    !!! warning "Achtung"
        Wenn Sie eine `Response` direkt zurückgeben, wie im obigen Beispiel, wird sie direkt zurückgegeben.
    
        Sie wird nicht mit einem Modell usw. serialisiert.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 13:04:57 GMT 2024
    - 3K bytes
    - Viewed (0)
Back to top