- Sort Score
- Result 10 results
- Languages All
Results 511 - 520 of 608 for status_code (1.03 sec)
-
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() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.9K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-operation-configuration.md
# 경로 작동 설정 *경로 작동 데코레이터*를 설정하기 위해서 전달할수 있는 몇 가지 매개변수가 있습니다. /// warning | 경고 아래 매개변수들은 *경로 작동 함수*가 아닌 *경로 작동 데코레이터*에 직접 전달된다는 사실을 기억하십시오. /// ## 응답 상태 코드 *경로 작동*의 응답에 사용될 (HTTP) `status_code`를 정의할수 있습니다. `404`와 같은 `int`형 코드를 직접 전달할수 있습니다. 하지만 각 코드의 의미를 모른다면, `status`에 있는 단축 상수들을 사용할수 있습니다: {* ../../docs_src/path_operation_configuration/tutorial001.py hl[3,17] *} 각 상태 코드들은 응답에 사용되며, OpenAPI 스키마에 추가됩니다.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 3.9K bytes - Viewed (0) -
docs/pt/docs/advanced/additional-responses.md
/// ## Combinando informações { #combining-information } Você também pode combinar informações de diferentes lugares, incluindo os parâmetros `response_model`, `status_code`, e `responses`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 9.4K bytes - Viewed (0) -
docs/ru/docs/advanced/path-operation-advanced-configuration.md
{* ../../docs_src/path_operation_advanced_configuration/tutorial004_py310.py hl[17:27] *} ## Дополнительные ответы { #additional-responses } Вы, вероятно, уже видели, как объявлять `response_model` и `status_code` для *операции пути*. Это определяет метаданные об основном ответе *операции пути*. Также можно объявлять дополнительные ответы с их моделями, статус-кодами и т.д.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 11.5K bytes - Viewed (0) -
tests/test_dependency_wrapped.py
"/wrapped-endpoint-async-wrapper/", "/async-wrapped-endpoint-async-wrapper/", ], ) def test_class_dependency(route): response = client.get(route) assert response.status_code == 200, response.textRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 11.2K bytes - Viewed (0) -
docs/zh/docs/advanced/additional-responses.md
- 但是如果您指定了一个自定义响应类,并将 `None `作为其媒体类型,**FastAPI**将使用 `application/json` 作为具有关联模型的任何其他响应。 /// ## 组合信息 您还可以联合接收来自多个位置的响应信息,包括 `response_model `、 `status_code` 和 `responses `参数。 您可以使用默认的状态码 `200` (或者您需要的自定义状态码)声明一个 `response_model `,然后直接在OpenAPI模式中在 `responses` 中声明相同响应的其他信息。 **FastAPI**将保留来自 `responses` 的附加信息,并将其与模型中的JSON Schema结合起来。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:29:26 UTC 2024 - 8.1K bytes - Viewed (0) -
scripts/notify_translations.py
github_graphql_url, headers=headers, timeout=settings.httpx_timeout, json={"query": query, "variables": variables, "operationName": "Q"}, ) if response.status_code != 200: logging.error( f"Response was not 200, after: {after}, category_id: {category_id}" ) logging.error(response.text) raise RuntimeError(response.text)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 12.7K bytes - Viewed (0) -
docs/fr/docs/advanced/additional-responses.md
/// ## Combinaison d'informations Vous pouvez également combiner des informations de réponse provenant de plusieurs endroits, y compris les paramètres `response_model`, `status_code` et `responses`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 9.5K bytes - Viewed (0) -
fastapi/security/api_key.py
Ref: https://datatracker.ietf.org/doc/html/rfc9110#name-401-unauthorized For this, this method sends a custom challenge `APIKey`. """ return HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "APIKey"}, ) def check_api_key(self, api_key: Optional[str]) -> Optional[str]: if not api_key:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 9.6K bytes - Viewed (1) -
scripts/people.py
github_graphql_url, headers=headers, timeout=settings.httpx_timeout, json={"query": query, "variables": variables, "operationName": "Q"}, ) if response.status_code != 200: logging.error( f"Response was not 200, after: {after}, category_id: {category_id}" ) logging.error(response.text) raise RuntimeError(response.text)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 12.3K bytes - Viewed (0)