- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 1,496 for RESPONSE (0.29 sec)
-
docs/em/docs/tutorial/response-status-code.md
👫 🏪, 👫 🧑🤝🧑 🎏 🔢, ✋️ 👈 🌌 👆 💪 ⚙️ 👨🎨 📋 🔎 👫: <img src="/img/tutorial/response-status-code/image02.png"> /// note | "📡 ℹ" 👆 💪 ⚙️ `from starlette import status`. **FastAPI** 🚚 🎏 `starlette.status` `fastapi.status` 🏪 👆, 👩💻. ✋️ ⚫️ 👟 🔗 ⚪️➡️ 💃. /// ## 🔀 🔢
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/response-status-code.md
/// Это позволит: * Возвращать указанный код статуса в ответе. * Документировать его как код статуса ответа в OpenAPI схеме (а значит, и в пользовательском интерфейсе): <img src="/img/tutorial/response-status-code/image01.png"> /// note | "Примечание" Некоторые коды статуса ответа (см. следующий раздел) указывают на то, что ответ не имеет тела.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7K bytes - Viewed (0) -
docs/ja/docs/tutorial/response-status-code.md
<img src="https://fastapi.tiangolo.com/img/tutorial/response-status-code/image02.png"> /// note | "技術詳細" また、`from starlette import status`を使うこともできます。 **FastAPI** は、`開発者の利便性を考慮して、fastapi.status`と同じ`starlette.status`を提供しています。しかし、これはStarletteから直接提供されています。 /// ## デフォルトの変更
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.6K bytes - Viewed (0) -
docs/es/docs/advanced/response-change-status-code.md
# Response - Cambiar el Status Code Probablemente ya has leído con anterioridad que puedes establecer un [Response Status Code](../tutorial/response-status-code.md){.internal-link target=_blank} por defecto. Pero en algunos casos necesitas retornar un status code diferente al predeterminado. ## Casos de uso Por ejemplo, imagina que quieres retornar un HTTP status code de "OK" `200` por defecto.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.6K bytes - Viewed (0) -
docs/zh/docs/advanced/response-change-status-code.md
# 响应 - 更改状态码 你可能之前已经了解到,你可以设置默认的[响应状态码](../tutorial/response-status-code.md){.internal-link target=_blank}。 但在某些情况下,你需要返回一个不同于默认值的状态码。 ## 使用场景 例如,假设你想默认返回一个HTTP状态码为“OK”`200`。 但如果数据不存在,你想创建它,并返回一个HTTP状态码为“CREATED”`201`。 但你仍然希望能够使用`response_model`过滤和转换你返回的数据。 对于这些情况,你可以使用一个`Response`参数。 ## 使用 `Response` 参数 你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。 然后你可以在这个*临时*响应对象中设置`status_code`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.4K bytes - Viewed (0) -
docs/de/docs/advanced/response-change-status-code.md
In diesen Fällen können Sie einen `Response`-Parameter verwenden. ## Einen `Response`-Parameter verwenden Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* deklarieren (wie Sie es auch für Cookies und Header tun können). Anschließend können Sie den `status_code` in diesem *vorübergehenden* Response-Objekt festlegen. ```Python hl_lines="1 9 12"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an.py
assert response.status_code == 200, response.text assert response.json() == {"item_id": "plumbus", "name": "The great Plumbus"} def test_put_forbidden(client: TestClient): response = client.put( "/items/bar?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 403, response.text assert response.json() == {"detail": "You can only update the item: plumbus"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an_py310.py
response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_py310.py
response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001.py
with patch("json.loads", side_effect=Exception): response = client.post("/items/", json={"test": "test2"}) assert response.status_code == 400, response.text 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: Thu Apr 18 19:40:57 UTC 2024 - 14.7K bytes - Viewed (0)