Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,556 for Responses (0.12 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial003.py

        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    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"},
            "paths": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  2. docs/ru/docs/advanced/custom-response.md

    ///
    
    ### `Response` { #response }
    
    Базовый класс `Response`, от него наследуются все остальные ответы.
    
    Его можно возвращать напрямую.
    
    Он принимает следующие параметры:
    
    - `content` — `str` или `bytes`.
    - `status_code` — целое число, HTTP статус-код.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/response-status-code.md

    # Response-Statuscode { #response-status-code }
    
    Genauso wie Sie ein Responsemodell angeben können, können Sie auch den HTTP-Statuscode für die <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> mit dem Parameter `status_code` in jeder der *Pfadoperationen* deklarieren:
    
    * `@app.get()`
    * `@app.post()`
    * `@app.put()`
    * `@app.delete()`
    * usw.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  4. tests/test_schema_extra_examples.py

        response = client.get("/query_examples/")
        assert response.status_code == 200, response.text
        response = client.get("/query_example_examples/")
        assert response.status_code == 200, response.text
        response = client.get("/header_example/")
        assert response.status_code == 200, response.text
        response = client.get("/header_examples/")
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  5. tests/test_additional_responses_custom_model_in_callback.py

    def main_route(callback_url: HttpUrl):
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  6. tests/test_generic_parameterless_depends.py

    def test_generic_parameterless_depends():
        response = client.get("/a")
        assert response.status_code == 200, response.text
        assert response.json() == {"cls": "A"}
    
        response = client.get("/b")
        assert response.status_code == 200, response.text
        assert response.json() == {"cls": "B"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/bigger-applications.md

    ### Add some custom `tags`, `responses`, and `dependencies` { #add-some-custom-tags-responses-and-dependencies }
    
    We are not adding the prefix `/items` nor the `tags=["items"]` to each *path operation* because we added them to the `APIRouter`.
    
    But we can still add _more_ `tags` that will be applied to a specific *path operation*, and also some extra `responses` specific to that *path operation*:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/handling-errors.md

    ```
    
    /// note | Technical Details
    
    You could also use `from starlette.requests import Request` and `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. The same with `Request`.
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9K bytes
    - Viewed (0)
  9. docs/de/docs/advanced/path-operation-advanced-configuration.md

    ## Zusätzliche Responses { #additional-responses }
    
    Sie haben wahrscheinlich gesehen, wie man das `response_model` und den `status_code` für eine *Pfadoperation* deklariert.
    
    Das definiert die Metadaten der Haupt-<abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> einer *Pfadoperation*.
    
    Sie können auch zusätzliche Responses mit deren Modellen, Statuscodes usw. deklarieren.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/path-operation-advanced-configuration.md

    It includes the `tags`, `parameters`, `requestBody`, `responses`, etc.
    
    This *path operation*-specific OpenAPI schema is normally generated automatically by **FastAPI**, but you can also extend it.
    
    /// tip
    
    This is a low level extension point.
    
    If you only need to declare additional responses, a more convenient way to do it is with [Additional Responses in OpenAPI](additional-responses.md){.internal-link target=_blank}.
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 7.2K bytes
    - Viewed (0)
Back to top