Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 125 for JSONResponse (0.13 sec)

  1. tests/test_default_response_class_router.py

    from fastapi import APIRouter, FastAPI
    from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse
    from fastapi.testclient import TestClient
    
    
    class OverrideResponse(JSONResponse):
        media_type = "application/x-override"
    
    
    app = FastAPI()
    router_a = APIRouter()
    router_a_a = APIRouter()
    router_a_b_override = APIRouter()  # Overrides default class
    router_b_override = APIRouter()  # Overrides default class
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java

    import org.lastaflute.web.Execute;
    import org.lastaflute.web.response.JsonResponse;
    import org.lastaflute.web.response.StreamResponse;
    
    /**
     * @author Keiichi Watanabe
     */
    public class ApiAdminBackupAction extends FessApiAdminAction {
    
        // GET /api/admin/backup/files
        @Execute
        public JsonResponse<ApiResult> files() {
            final List<Map<String, String>> list = getBackupItems();
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sat Oct 12 01:54:15 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/custom-response.md

    # 🛃 📨 - 🕸, 🎏, 📁, 🎏
    
    🔢, **FastAPI** 🔜 📨 📨 ⚙️ `JSONResponse`.
    
    👆 💪 🔐 ⚫️ 🛬 `Response` 🔗 👀 [📨 📨 🔗](response-directly.md){.internal-link target=_blank}.
    
    ✋️ 🚥 👆 📨 `Response` 🔗, 📊 🏆 🚫 🔁 🗜, &amp; 🧾 🏆 🚫 🔁 🏗 (🖼, 🔌 🎯 "📻 🆎", 🇺🇸🔍 🎚 `Content-Type` 🍕 🏗 🗄).
    
    ✋️ 👆 💪 📣 `Response` 👈 👆 💚 ⚙️, *➡ 🛠️ 👨‍🎨*.
    
    🎚 👈 👆 📨 ⚪️➡️ 👆 *➡ 🛠️ 🔢* 🔜 🚮 🔘 👈 `Response`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/additional-responses.md

    # OPENAPI 中的其他响应
    
    您可以声明附加响应,包括附加状态代码、媒体类型、描述等。
    
    这些额外的响应将包含在OpenAPI模式中,因此它们也将出现在API文档中。
    
    但是对于那些额外的响应,你必须确保你直接返回一个像 `JSONResponse` 一样的 `Response` ,并包含你的状态代码和内容。
    
    ## `model`附加响应
    您可以向路径操作装饰器传递参数 `responses` 。
    
    它接收一个 `dict`,键是每个响应的状态代码(如`200`),值是包含每个响应信息的其他 `dict`。
    
    每个响应字典都可以有一个关键模型,其中包含一个 `Pydantic` 模型,就像 `response_model` 一样。
    
    **FastAPI**将采用该模型,生成其`JSON Schema`并将其包含在`OpenAPI`中的正确位置。
    
    例如,要声明另一个具有状态码 `404` 和`Pydantic`模型 `Message` 的响应,可以写:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/custom-response.md

    # Benutzerdefinierte Response – HTML, Stream, Datei, andere
    
    Standardmäßig gibt **FastAPI** die Responses mittels `JSONResponse` zurück.
    
    Sie können das überschreiben, indem Sie direkt eine `Response` zurückgeben, wie in [Eine Response direkt zurückgeben](response-directly.md){.internal-link target=_blank} gezeigt.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/app/web/api/admin/documents/ApiAdminDocumentsAction.java

    import org.codelibs.fess.helper.LanguageHelper;
    import org.codelibs.fess.thumbnail.ThumbnailManager;
    import org.codelibs.fess.util.ComponentUtil;
    import org.lastaflute.web.Execute;
    import org.lastaflute.web.response.JsonResponse;
    import org.opensearch.action.bulk.BulkResponse;
    
    import jakarta.annotation.Resource;
    
    public class ApiAdminDocumentsAction extends FessApiAdminAction {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Jul 25 01:48:41 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/response-headers.md

    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    /// note | "Detalhes técnicos"
    
    Você também pode usar `from starlette.responses import Response` ou `from starlette.responses import JSONResponse`.
    
    **FastAPI** fornece as mesmas `starlette.responses` como `fastapi.responses` apenas como uma conveniência para você, desenvolvedor. Mas a maioria das respostas disponíveis vem diretamente do Starlette.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 16 07:44:45 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/additional-responses.md

    /// warning
    
    👉 👍 🏧 ❔.
    
    🚥 👆 ▶️ ⏮️ **FastAPI**, 👆 💪 🚫 💪 👉.
    
    ///
    
    👆 💪 📣 🌖 📨, ⏮️ 🌖 👔 📟, 🔉 🆎, 📛, ♒️.
    
    👈 🌖 📨 🔜 🔌 🗄 🔗, 👫 🔜 😑 🛠️ 🩺.
    
    ✋️ 👈 🌖 📨 👆 ✔️ ⚒ 💭 👆 📨 `Response` 💖 `JSONResponse` 🔗, ⏮️ 👆 👔 📟 &amp; 🎚.
    
    ## 🌖 📨 ⏮️ `model`
    
    👆 💪 🚶‍♀️ 👆 *➡ 🛠️ 👨‍🎨* 🔢 `responses`.
    
    ⚫️ 📨 `dict`, 🔑 👔 📟 🔠 📨, 💖 `200`, &amp; 💲 🎏 `dict`Ⓜ ⏮️ ℹ 🔠 👫.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/custom-response.md

    # 自定义响应 - HTML,流,文件和其他
    
    **FastAPI** 默认会使用 `JSONResponse` 返回响应。
    
    你可以通过直接返回 `Response` 来重载它,参见 [直接返回响应](response-directly.md){.internal-link target=_blank}。
    
    但如果你直接返回 `Response`,返回数据不会自动转换,也不会自动生成文档(例如,在 HTTP 头 `Content-Type` 中包含特定的「媒体类型」作为生成的 OpenAPI 的一部分)。
    
    你还可以在 *路径操作装饰器* 中声明你想用的 `Response`。
    
    你从 *路径操作函数* 中返回的内容将被放在该 `Response` 中。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/response-headers.md

    ```Python hl_lines="10-12"
    {!../../docs_src/response_headers/tutorial001.py!}
    ```
    
    /// note | "📡 ℹ"
    
    👆 💪 ⚙️ `from starlette.responses import Response` ⚖️ `from starlette.responses import JSONResponse`.
    
    **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩‍💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃.
    
     &amp; `Response` 💪 ⚙️ 🛎 ⚒ 🎚 &amp; 🍪, **FastAPI** 🚚 ⚫️ `fastapi.Response`.
    
    ///
    
    ## 🛃 🎚
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
Back to top