Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 2,154 for Responses (0.19 sec)

  1. tests/test_response_by_alias.py

    
    def test_read_dict():
        response = client.get("/dict")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Foo"}
    
    
    def test_read_model():
        response = client.get("/model")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Foo"}
    
    
    def test_read_list():
        response = client.get("/list")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  2. docs/fr/docs/advanced/additional-status-codes.md

    !!! note "Détails techniques"
        Vous pouvez également utiliser `from starlette.responses import JSONResponse`.
    
        Pour plus de commodités, **FastAPI** fournit les objets `starlette.responses` sous forme d'un alias accessible par `fastapi.responses`. Mais la plupart des réponses disponibles proviennent directement de Starlette. Il en est de même avec l'objet `statut`.
    
    ## Documents OpenAPI et API
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/extra-data-types.md

        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * Python `datetime.date`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15`.
    * `datetime.time`:
        * A Python `datetime.time`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `14:23:55.003`.
    * `datetime.timedelta`:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/response-directly.md

    ⚫️ 💪 ⚠, 🖼, 📨 🛃 🎚 ⚖️ 🍪.
    
    ## 📨 `Response`
    
    👐, 👆 💪 📨 🙆 `Response` ⚖️ 🙆 🎧-🎓 ⚫️.
    
    !!! tip
        `JSONResponse` ⚫️ 🎧-🎓 `Response`.
    
    & 🕐❔ 👆 📨 `Response`, **FastAPI** 🔜 🚶‍♀️ ⚫️ 🔗.
    
    ⚫️ 🏆 🚫 🙆 💽 🛠️ ⏮️ Pydantic 🏷, ⚫️ 🏆 🚫 🗜 🎚 🙆 🆎, ♒️.
    
    👉 🤝 👆 📚 💪. 👆 💪 📨 🙆 📊 🆎, 🔐 🙆 💽 📄 ⚖️ 🔬, ♒️.
    
    ## ⚙️ `jsonable_encoder` `Response`
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Apr 01 09:26:04 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  5. tests/test_response_model_sub_types.py

    
    def test_path_operations():
        response = client.get("/valid1")
        assert response.status_code == 200, response.text
        response = client.get("/valid2")
        assert response.status_code == 200, response.text
        response = client.get("/valid3")
        assert response.status_code == 200, response.text
        response = client.get("/valid4")
        assert response.status_code == 200, response.text
    
    
    def test_openapi_schema():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  6. tests/test_additional_responses_response_class.py

        responses={500: {"description": "Error", "model": JsonApiError}},
    )
    async def a():
        pass  # pragma: no cover
    
    
    @app.get("/b", responses={500: {"description": "Error", "model": Error}})
    async def b():
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. tests/test_response_model_as_return_annotation.py

        response = client.get("/response_model-no_annotation-return_same_model")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "John", "surname": "Doe"}
    
    
    def test_response_model_no_annotation_return_exact_dict():
        response = client.get("/response_model-no_annotation-return_exact_dict")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "John", "surname": "Doe"}
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Aug 14 09:49:57 UTC 2023
    - 47.7K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-status-code.md

    It will:
    
    * Return that status code in the response.
    * Document it as such in the OpenAPI schema (and so, in the user interfaces):
    
    <img src="/img/tutorial/response-status-code/image01.png">
    
    !!! note
        Some response codes (see the next section) indicate that the response does not have a body.
    
        FastAPI knows this, and will produce OpenAPI docs that state there is no response body.
    
    ## About HTTP status codes
    
    !!! note
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Aug 29 14:02:58 UTC 2020
    - 4K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/additional-status-codes.md

    ## 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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/RecordingCallback.kt

      @Synchronized
      override fun onResponse(
        call: Call,
        response: Response,
      ) {
        val body = response.body.string()
        responses.add(RecordedResponse(call.request(), response, null, body, null))
        (this as Object).notifyAll()
      }
    
      /**
       * Returns the recorded response triggered by `request`. Throws if the response isn't
       * enqueued before the timeout.
       */
      @Synchronized
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
Back to top