Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 230 for response (0.38 sec)

  1. docs/em/docs/advanced/response-directly.md

    ⚫️ 💪 ⚠, 🖼, 📨 🛃 🎚 ⚖️ 🍪.
    
    ## 📨 `Response`
    
    👐, 👆 💪 📨 🙆 `Response` ⚖️ 🙆 🎧-🎓 ⚫️.
    
    !!! tip
        `JSONResponse` ⚫️ 🎧-🎓 `Response`.
    
    & 🕐❔ 👆 📨 `Response`, **FastAPI** 🔜 🚶‍♀️ ⚫️ 🔗.
    
    ⚫️ 🏆 🚫 🙆 💽 🛠️ ⏮️ Pydantic 🏷, ⚫️ 🏆 🚫 🗜 🎚 🙆 🆎, ♒️.
    
    👉 🤝 👆 📚 💪. 👆 💪 📨 🙆 📊 🆎, 🔐 🙆 💽 📄 ⚖️ 🔬, ♒️.
    
    ## ⚙️ `jsonable_encoder` `Response`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  2. docs/es/docs/advanced/response-directly.md

    Esto puede ser útil, por ejemplo, para devolver cookies o headers personalizados.
    
    ## Devolver una `Response`
    
    De hecho, puedes devolver cualquier `Response` o cualquier subclase de la misma.
    
    !!! tip "Consejo"
        `JSONResponse` en sí misma es una subclase de `Response`.
    
    Y cuando devuelves una `Response`, **FastAPI** la pasará directamente.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 11:57:27 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/response-directly.md

    直接返回响应可能会有用处,比如返回自定义的响应头和 cookies。
    
    ## 返回 `Response`
    
    事实上,你可以返回任意 `Response` 或者任意 `Response` 的子类。
    
    !!! tip "小贴士"
        `JSONResponse` 本身是一个 `Response` 的子类。
    
    当你返回一个 `Response` 时,**FastAPI** 会直接传递它。
    
    **FastAPI** 不会用 Pydantic 模型做任何数据转换,不会将响应内容转换成任何类型,等等。
    
    这种特性给你极大的可扩展性。你可以返回任何数据类型,重写任何数据声明或者校验,等等。
    
    ## 在 `Response` 中使用 `jsonable_encoder`
    
    由于 **FastAPI** 并未对你返回的 `Response` 做任何改变,你必须确保你已经准备好响应内容。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  4. docs/ja/docs/advanced/response-directly.md

    これは例えば、カスタムヘッダーやcookieを返すときに便利です。
    
    ## `Response` を返す
    
    実際は、`Response` やそのサブクラスを返すことができます。
    
    !!! tip "豆知識"
        `JSONResponse` それ自体は、 `Response` のサブクラスです。
    
    `Response` を返した場合は、**FastAPI** は直接それを返します。
    
    それは、Pydanticモデルのデータ変換や、コンテンツを任意の型に変換したりなどはしません。
    
    これは多くの柔軟性を提供します。任意のデータ型を返したり、任意のデータ宣言やバリデーションをオーバーライドできます。
    
    ## `jsonable_encoder` を `Response` の中で使う
    
    **FastAPI** はあなたが返す `Response` に対して何も変更を加えないので、コンテンツが準備できていることを保証しなければなりません。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Nov 05 22:50:38 GMT 2020
    - 3.6K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/response-model.md

    ### `response_model` Priority
    
    If you declare both a return type and a `response_model`, the `response_model` will take priority and be used by FastAPI.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/response-model.md

    И ваши помощники разработки также будут счастливы, т.к. оба класса `RedirectResponse` и `JSONResponse` являются подклассами `Response`. Таким образом мы получаем корректную аннотацию типа.
    
    ### Подкласс Response в аннотации типа
    
    Вы также можете указать подкласс `Response` в аннотации типа:
    
    ```Python hl_lines="8-9"
    {!> ../../../docs_src/response_model/tutorial003_03.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 30.5K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/response-model.md

    ### `response_model_include` 和 `response_model_exclude`
    
    你还可以使用*路径操作装饰器*的 `response_model_include` 和 `response_model_exclude` 参数。
    
    它们接收一个由属性名称 `str` 组成的 `set` 来包含(忽略其他的)或者排除(包含其他的)这些属性。
    
    如果你只有一个 Pydantic 模型,并且想要从输出中移除一些数据,则可以使用这种快捷方法。
    
    !!! tip
        但是依然建议你使用上面提到的主意,使用多个类而不是这些参数。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/response-model.md

    ```Python hl_lines="9 11 16"
    {!../../../docs_src/response_model/tutorial003.py!}
    ```
    
    ここでは、*path operation関数*がパスワードを含む同じ入力ユーザーを返しているにもかかわらず:
    
    ```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 May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. docs/de/docs/advanced/response-cookies.md

    !!! note "Technische Details"
        Sie können auch `from starlette.responses import Response` oder `from starlette.responses import JSONResponse` verwenden.
    
        **FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/response-cookies.md

    ### More info
    
    !!! note "Technical Details"
        You could also use `from starlette.responses import Response` or `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 May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.2K bytes
    - Viewed (0)
Back to top