- Sort Score
- Result 10 results
- Languages All
Results 411 - 420 of 1,560 for respond (0.05 sec)
-
samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java
import okhttp3.Request; import okhttp3.Response; public final class SynchronousGet { private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder() .url("https://publicobject.com/helloworld.txt") .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py
client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py39 def test_openapi_schema(): from docs_src.cookie_params.tutorial001_an_py39 import app client = TestClient(app) response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_py310.py
response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema(): from docs_src.header_params.tutorial002_py310 import app client = TestClient(app) response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an.py
], ) def test(path, headers, expected_status, expected_response): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java
Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { assertTrue(response.code() == 200 || response.code() == 404); assertEquals(Protocol.HTTP_2, response.protocol()); for (Certificate c: response.handshake().peerCertificates()) { X509Certificate x = (X509Certificate) c;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jul 26 06:37:08 UTC 2021 - 1.9K bytes - Viewed (0) -
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,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 3.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt
} @Throws(IOException::class) fun openResponseBody(response: Response): ResponseBody { try { val contentType = response.header("Content-Type") val contentLength = codec.reportedContentLength(response) val rawSource = codec.openResponseBodySource(response) val source = ResponseBodySource(rawSource, contentLength) return RealResponseBody(contentType, contentLength, source.buffer())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004_an_py310.py
response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 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",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_tutorial001_pv1.py
monkeypatch.setenv("ADMIN_EMAIL", "******@****.***") from docs_src.settings.tutorial001_pv1 import app client = TestClient(app) response = client.get("/info") assert response.status_code == 200, response.text assert response.json() == { "app_name": "Awesome API", "admin_email": "******@****.***", "items_per_user": 50,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 556 bytes - Viewed (0) -
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 Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 37.7K bytes - Viewed (0)