- Sort Score
- Result 10 results
- Languages All
Results 471 - 480 of 1,496 for RESPONSE (0.11 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
writeTimeoutMillis = client.writeTimeoutMillis, ) var calledNoMoreExchanges = false try { val response = chain.proceed(originalRequest) if (isCanceled()) { response.closeQuietly() throw IOException("Canceled") } return response } catch (e: IOException) { calledNoMoreExchanges = true throw noMoreExchanges(e) as Throwable } finally {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 17.9K bytes - Viewed (0) -
tests/test_additional_response_extra.py
app.include_router(router) client = TestClient(app) def test_path_operation(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == {"id": "foo"} 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt
.url("https://publicobject.com/helloworld.txt") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") for ((name, value) in response.headers) { println("$name: $value") } println(response.body.string()) } } } fun main() { SynchronousGet().run()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_route_scope.py
client = TestClient(app) def test_get(): response = client.get("/users/rick") assert response.status_code == 200, response.text assert response.json() == {"user_id": "rick", "path": "/users/{user_id}"} def test_invalid_method_doesnt_match(): response = client.post("/users/rick") assert response.status_code == 405, response.text def test_invalid_path_doesnt_match():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
assertThat(call.canceled).isTrue() assertThat(call.responseClosed).isTrue() } } /** A call that keeps track of whether its response body is closed. */ private class ClosableCall : FailingCall() { private val response = Response.Builder() .request(Request("https://example.com/".toHttpUrl())) .protocol(Protocol.HTTP_1_1) .message("OK") .code(200)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 5.4K bytes - Viewed (0) -
tests/test_include_route.py
return JSONResponse({"hello": "world"}) app.include_router(router) client = TestClient(app) def test_sub_router(): response = client.get("/items/") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Apr 08 04:37:38 UTC 2020 - 496 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py
client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 575 bytes - Viewed (0) -
docs/en/docs/tutorial/path-operation-configuration.md
//// /// info Notice that `response_description` refers specifically to the response, the `description` refers to the *path operation* in general. /// /// check OpenAPI specifies that each *path operation* requires a response description. So, if you don't provide one, **FastAPI** will automatically generate one of "Successful response". /// <img src="/img/tutorial/path-operation-configuration/image03.png">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.4K bytes - Viewed (0) -
docs_src/response_change_status_code/tutorial001.py
from fastapi import FastAPI, Response, status app = FastAPI() tasks = {"foo": "Listen to the Bar Fighters"} @app.put("/get-or-create-task/{task_id}", status_code=200) def get_or_create_task(task_id: str, response: Response): if task_id not in tasks: tasks[task_id] = "This didn't exist before" response.status_code = status.HTTP_201_CREATED
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 391 bytes - Viewed (0) -
tests/test_sub_callbacks.py
client = TestClient(app) def test_get(): response = client.post( "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3} ) assert response.status_code == 200, response.text assert response.json() == {"msg": "Invoice received"} def test_openapi_schema(): with client: response = client.get("/openapi.json") 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 - 13.8K bytes - Viewed (0)