- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 1,556 for Responses (0.04 sec)
-
docs/uk/docs/tutorial/handling-errors.md
``` /// note | Технічні деталі Ви також можете використовувати `from starlette.requests import Request` і `from starlette.responses import JSONResponse`. **FastAPI** надає ті самі `starlette.responses`, що й `fastapi.responses`, просто для зручності розробника. Але більшість доступних відповідей надходять безпосередньо зі Starlette. Те ж саме стосується і `Request`. ///
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 13.9K bytes - Viewed (0) -
docs/es/docs/advanced/path-operation-advanced-configuration.md
{* ../../docs_src/path_operation_advanced_configuration/tutorial004_py310.py hl[17:27] *} ## Responses Adicionales { #additional-responses } Probablemente has visto cómo declarar el `response_model` y el `status_code` para una *path operation*. Eso define los metadatos sobre el response principal de una *path operation*. También puedes declarar responses adicionales con sus modelos, códigos de estado, etc.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 8.3K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
# Delete a hero response = client.delete(f"/heroes/{hero_id}") assert response.status_code == 200, response.text assert response.json() == snapshot({"ok": True}) response = client.get(f"/heroes/{hero_id}") assert response.status_code == 404, response.text response = client.delete(f"/heroes/{hero_id}") assert response.status_code == 404, response.textRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 14K bytes - Viewed (0) -
tests/test_infer_param_optionality.py
response = client.get("/users") assert response.status_code == 200, response.text assert response.json() == [{"user_id": "u1"}, {"user_id": "u2"}] def test_get_user(): """Check that /users/{user_id} returns expected data""" response = client.get("/users/abc123") assert response.status_code == 200, response.text assert response.json() == {"user_id": "abc123"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.1K bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial003.py
], ) def test_get_users(user_id: str, expected_response: dict): response = client.get(f"/users/{user_id}") assert response.status_code == 200, response.text assert response.json() == expected_response 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.6K bytes - Viewed (0) -
docs_src/response_model/tutorial003_04_py39.py
from typing import Union from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Union[Response, dict]: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 384 bytes - Viewed (0) -
docs/pt/docs/advanced/additional-status-codes.md
/// ## OpenAPI e documentação da API { #openapi-and-api-docs } Se você retorna códigos de status adicionais e retornos diretamente, eles não serão incluídos no esquema do OpenAPI (a documentação da API), porque o FastAPI não tem como saber de antemão o que será retornado.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 2.2K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/processor/impl/DefaultResponseProcessor.java
* It processes the response data based on the HTTP status code and configured transformer. * </p> * * <p> * It handles successful responses by transforming the data using a {@link Transformer} * and storing the result. It also handles "Not Modified" responses by creating an empty * result and storing it. Unsuccessful responses are logged for debugging purposes. * </p> * * <p>Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Thu Aug 07 02:55:08 UTC 2025 - 12.5K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006c.py
client = TestClient(app) def test_redirect_status_code(): response = client.get("/pydantic", follow_redirects=False) assert response.status_code == 302 assert response.headers["location"] == "https://docs.pydantic.dev/" 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 904 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial005.py
client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text def test_openapi_schema(): 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: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0)