- Sort Score
- Result 10 results
- Languages All
Results 341 - 350 of 1,551 for responseCh (0.05 sec)
-
tests/test_param_in_path_and_dependency.py
async def read_users(user_id: int): pass client = TestClient(app) def test_read_users(): response = client.get("/users/42") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json") data = response.json() assert data == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"},
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2Response.java
/** * {@inheritDoc} * * @see jcifs.util.transport.Response#setExpiration(java.lang.Long) */ @Override public void setExpiration(final Long exp) { this.expiration = exp; } /** * Checks whether the asynchronous interim response has been handled. * * @return whether the interim response has been handled */ public boolean isAsyncHandled() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 8.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial006.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.4K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
async def middleware(request, call_next): response: StreamingResponse = await call_next(request) response.headers["x-state"] = json.dumps(state.copy()) return response client = TestClient(app) def test_async_state(): assert state["/async"] == "asyncgen not started" response = client.get("/async") assert response.status_code == 200, response.text assert response.json() == "asyncgen started"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 11.5K bytes - Viewed (0) -
tests/test_openapi_query_parameter_extension.py
return {} client = TestClient(app) def test_get_route(): response = client.get("/") assert response.status_code == 200, response.text assert response.json() == {} def test_openapi(): 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"},Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.2K bytes - Viewed (0) -
docs/zh/docs/advanced/additional-status-codes.md
/// /// note | 技术细节 你也可以使用 `from starlette.responses import JSONResponse`。 出于方便,**FastAPI** 为开发者提供同 `starlette.responses` 一样的 `fastapi.responses`。但是大多数可用的响应都是直接来自 Starlette。`status` 也是一样。 /// ## OpenAPI 和 API 文档 如果你直接返回额外的状态码和响应,它们不会包含在 OpenAPI 方案(API 文档)中,因为 FastAPI 没办法预先知道你要返回什么。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt
.build(), ) call.execute().use { response -> assertThat(response.headers) .isEqualTo(headersOf("h1", "v1", "h2", "v2")) val responseBody = response.body.source() assertThat(responseBody.readUtf8(2)).isEqualTo("ok") assertThat(responseBody.exhausted()).isTrue() assertThat(response.trailers()).isEqualTo(headersOf("trailers", "boom")) }
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 25.8K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text assert response.json() == {"message": "Item not found"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.6K bytes - Viewed (0) -
tests/test_dependency_yield_scope.py
client = TestClient(app) def test_function_scope() -> None: response = client.get("/function-scope") assert response.status_code == 200 data = response.json() assert data["is_open"] is False def test_request_scope() -> None: response = client.get("/request-scope") assert response.status_code == 200 data = response.json() assert data["is_open"] is True
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.7K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py
def test_get_random_item(client: TestClient): response = client.get("/items") assert response.status_code == 200, response.text assert response.json() == {"id": IsStr(), "name": IsStr()} def test_get_item(client: TestClient): response = client.get("/items?id=isbn-9781529046137") assert response.status_code == 200, response.text assert response.json() == { "id": "isbn-9781529046137",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5K bytes - Viewed (0)