Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,674 for response (0.26 sec)

  1. tests/test_response_model_data_filter_no_inheritance.py

        )
        assert response.json() == {"email": "******@****.***"}
    
    
    def test_filter_second_level_model():
        response = client.get("/pets/1")
        assert response.json() == {
            "name": "Nibbler",
            "owner": {"email": "******@****.***"},
        }
    
    
    def test_list_of_models():
        response = client.get("/pets/")
        assert response.json() == [
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CacheTest.kt

            .build()
        val response1 = client.newCall(request).execute()
        response1.body.close()
        assertThat(response1.header("X-Response-ID")).isEqualTo("1")
        val response2 = get(url)
        response2.body.close()
        if (expectCached) {
          assertThat(response2.header("X-Response-ID")).isEqualTo("1")
        } else {
          assertThat(response2.header("X-Response-ID")).isEqualTo("2")
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        val response = call.execute()
    
        // Body contains nothing.
        assertThat(response.body.bytes().size).isEqualTo(0)
        assertThat(response.body.contentLength()).isEqualTo(0)
    
        // Content-Length header doesn't exist in a 204 response.
        assertThat(response.header("content-length")).isNull()
        assertThat(response.code).isEqualTo(204)
        val request = server.takeRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        server.enqueue(MockResponse(body = "b"))
        val request = Request(server.url("/"))
        val response1 = client.newCall(request).execute()
        val response2 = client.newCall(request).execute()
        response1.body.string() // Discard the response body.
        response2.body.string() // Discard the response body.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  5. fastapi/responses.py

    from starlette.responses import FileResponse as FileResponse  # noqa
    from starlette.responses import HTMLResponse as HTMLResponse  # noqa
    from starlette.responses import JSONResponse as JSONResponse  # noqa
    from starlette.responses import PlainTextResponse as PlainTextResponse  # noqa
    from starlette.responses import RedirectResponse as RedirectResponse  # noqa
    from starlette.responses import Response as Response  # noqa
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  6. docs/de/docs/advanced/additional-responses.md

    ## Zusätzliche Response mit `model`
    
    Sie können Ihren *Pfadoperation-Dekoratoren* einen Parameter `responses` übergeben.
    
    Der nimmt ein `dict` entgegen, die Schlüssel sind Statuscodes für jede Response, wie etwa `200`, und die Werte sind andere `dict`s mit den Informationen für jede Response.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:26 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/additional-responses.md

    You can declare a `response_model`, using the default status code `200` (or a custom one if you need), and then declare additional information for that same response in `responses`, directly in the OpenAPI schema.
    
    **FastAPI** will keep the additional information from `responses`, and combine it with the JSON Schema from your model.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  8. docs/en/docs/reference/responses.md

    # Custom Response Classes - File, HTML, Redirect, Streaming, etc.
    
    There are several custom response classes you can use to create an instance and return them directly from your *path operations*.
    
    Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
    
    You can import them directly from `fastapi.responses`:
    
    ```python
    from fastapi.responses import (
        FileResponse,
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  9. docs/recipes.md

            }
    
            String response2Body;
            try (Response response2 = client.newCall(request).execute()) {
              if (!response2.isSuccessful()) throw new IOException("Unexpected code " + response2);
    
              response2Body = response2.body().string();
              System.out.println("Response 2 response:          " + response2);
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  10. docs/de/docs/reference/responses.md

    Lesen Sie mehr darüber in der [FastAPI-Dokumentation zu benutzerdefinierten Responses – HTML, Stream, Datei, andere](../advanced/custom-response.md).
    
    Sie können diese direkt von `fastapi.responses` importieren:
    
    ```python
    from fastapi.responses import (
        FileResponse,
        HTMLResponse,
        JSONResponse,
        ORJSONResponse,
        PlainTextResponse,
        RedirectResponse,
        Response,
        StreamingResponse,
        UJSONResponse,
    )
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top