Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,556 for Responses (0.04 sec)

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

    {* ../../docs_src/response_directly/tutorial001_py310.py hl[5:6,20:21] *}
    
    /// note | Technical Details
    
    You could also use `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.
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/extra-data-types.md

        * Wird in Requests und Responses als `str` dargestellt.
    * `datetime.datetime`:
        * Ein Python-`datetime.datetime`.
        * Wird in Requests und Responses als `str` im ISO 8601-Format dargestellt, etwa: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * Python-`datetime.date`.
        * Wird in Requests und Responses als `str` im ISO 8601-Format dargestellt, etwa: `2008-09-15`.
    * `datetime.time`:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 15:10:09 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  3. tests/test_computed_fields.py

        assert response.status_code == 200, response.text
        assert response.json() == {"width": 3, "length": 4, "area": 12}
    
    
    @pytest.mark.parametrize("client", [True, False], indirect=True)
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. docs/ja/docs/advanced/response-directly.md

    XMLを文字列にし、`Response` に含め、それを返します。
    
    {* ../../docs_src/response_directly/tutorial002.py hl[1,18] *}
    
    ## 備考
    
    `Response` を直接返す場合、バリデーションや、変換 (シリアライズ) や、自動ドキュメントは行われません。
    
    しかし、[Additional Responses in OpenAPI](additional-responses.md){.internal-link target=_blank}に記載されたようにドキュメントを書くこともできます。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/additional-status-codes.md

    ///
    
    ## OpenAPI and API docs { #openapi-and-api-docs }
    
    If you return additional status codes and responses directly, they won't be included in the OpenAPI schema (the API docs), because FastAPI doesn't have a way to know beforehand what you are going to return.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/response-status-code.md

    * **`300 - 399`** son para "Redirección". Los responses con estos códigos de estado pueden o no tener un body, excepto `304`, "Not Modified", que no debe tener uno.
    * **`400 - 499`** son para responses de "Error del Cliente". Este es el segundo tipo que probablemente más usarías.
        * Un ejemplo es `404`, para un response "Not Found".
        * Para errores genéricos del cliente, puedes usar simplemente `400`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_generate_clients/test_tutorial004.py

                                            },
                                            "title": "Response Items-Get Items",
                                            "type": "array",
                                        },
                                    },
                                },
                                "description": "Successful Response",
                            },
                        },
                        "summary": "Get Items",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_generate_clients/test_tutorial002.py

    
    def test_get_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  9. docs/ko/docs/advanced/custom-response.md

    `Response`를 사용하여 다른 어떤 것도 반환 할수 있으며, 직접 하위 클래스를 만들 수도 있습니다.
    
    /// note | 기술 세부사항
    
    `from starlette.responses import HTMLResponse`를 사용할 수도 있습니다.
    
    **FastAPI**는 개발자인 여러분의 편의를 위해 `starlette.responses`를 `fastapi.responses`로 제공 하지만, 대부분의 사용 가능한 응답은 Starlette에서 직접 가져옵니다.
    
    ///
    
    ### `Response`
    
    기본 `Response` 클래스는 다른 모든 응답 클래스의 부모 클래스 입니다.
    
    이 클래스를 직접 반환할 수 있습니다.
    
    다음 매개변수를 받을 수 있습니다:
    
    * `content` - `str` 또는 `bytes`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Feb 15 11:21:20 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  10. docs_src/additional_responses/tutorial004_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.responses import FileResponse
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        id: str
        value: str
    
    
    responses = {
        404: {"description": "Item not found"},
        302: {"description": "The item was moved"},
        403: {"description": "Not enough privileges"},
    }
    
    
    app = FastAPI()
    
    
    @app.get(
        "/items/{item_id}",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 701 bytes
    - Viewed (0)
Back to top