- Sort Score
- Result 10 results
- Languages All
Results 441 - 450 of 867 for 200 (0.01 sec)
-
docs_src/app_testing/tutorial003.py
async def read_items(item_id: str): return items[item_id] def test_read_items(): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 528 bytes - Viewed (0) -
tests/test_router_prefix_with_template.py
app.include_router(router, prefix="/{segment}") client = TestClient(app) def test_get(): response = client.get("/seg/users/foo") 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 - 484 bytes - Viewed (0) -
docs/zh/docs/tutorial/response-status-code.md
如果已经了解 HTTP 状态码,请跳到下一章。 /// 在 HTTP 协议中,发送 3 位数的数字状态码是响应的一部分。 这些状态码都具有便于识别的关联名称,但是重要的还是数字。 简言之: * `100` 及以上的状态码用于返回**信息**。这类状态码很少直接使用。具有这些状态码的响应不能包含响应体 * **`200`** 及以上的状态码用于表示**成功**。这些状态码是最常用的 * `200` 是默认状态代码,表示一切**正常** * `201` 表示**已创建**,通常在数据库中创建新记录后使用 * `204` 是一种特殊的例子,表示**无内容**。该响应在没有为客户端返回内容时使用,因此,该响应不能包含响应体 * **`300`** 及以上的状态码用于**重定向**。具有这些状态码的响应不一定包含响应体,但 `304`**未修改**是个例外,该响应不得包含响应体
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.7K bytes - Viewed (0) -
docs_src/custom_response/tutorial003.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 394 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial001.py
from fastapi.websockets import WebSocketDisconnect from docs_src.websockets.tutorial001 import app client = TestClient(app) def test_main(): response = client.get("/") assert response.status_code == 200, response.text assert b"<!DOCTYPE html>" in response.content def test_websocket(): with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/ws") as websocket:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 10 09:08:19 UTC 2020 - 822 bytes - Viewed (0) -
docs/pt/docs/tutorial/handling-errors.md
* etc. Nesses casos, você normalmente retornaria um **HTTP status code** próximo ao status code na faixa do status code **400** (do 400 ao 499). Isso é bastante similar ao caso do HTTP status code 200 (do 200 ao 299). Esses "200" status codes significam que, de algum modo, houve sucesso na requisição. Os status codes na faixa dos 400 significam que houve um erro por parte do cliente.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10K bytes - Viewed (0) -
docs_src/additional_responses/tutorial003.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 837 bytes - Viewed (0) -
docs/em/docs/tutorial/response-status-code.md
/// 🇺🇸🔍, 👆 📨 🔢 👔 📟 3️⃣ 9️⃣ 🍕 📨. 👫 👔 📟 ✔️ 📛 🔗 🤔 👫, ✋️ ⚠ 🍕 🔢. 📏: * `100` & 🔛 "ℹ". 👆 🛎 ⚙️ 👫 🔗. 📨 ⏮️ 👫 👔 📟 🚫🔜 ✔️ 💪. * **`200`** & 🔛 "🏆" 📨. 👫 🕐 👆 🔜 ⚙️ 🏆. * `200` 🔢 👔 📟, ❔ ⛓ 🌐 "👌". * ➕1️⃣ 🖼 🔜 `201`, "✍". ⚫️ 🛎 ⚙️ ⏮️ 🏗 🆕 ⏺ 💽. * 🎁 💼 `204`, "🙅♂ 🎚". 👉 📨 ⚙️ 🕐❔ 📤 🙅♂ 🎚 📨 👩💻, & 📨 🔜 🚫 ✔️ 💪.
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_src/custom_response/tutorial004.py
<title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse(content=html_content, status_code=200) @app.get("/items/", response_class=HTMLResponse) async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 491 bytes - Viewed (0) -
tests/test_tutorial/test_advanced_middleware/test_tutorial001.py
from docs_src.advanced_middleware.tutorial001 import app def test_middleware(): client = TestClient(app, base_url="https://testserver") response = client.get("/") assert response.status_code == 200, response.text client = TestClient(app) response = client.get("/", follow_redirects=False) assert response.status_code == 307, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 13 14:26:09 UTC 2022 - 474 bytes - Viewed (0)