- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 859 for Response (0.22 sec)
-
tests/test_serialize_response.py
] client = TestClient(app) def test_valid(): response = client.get("/items/valid") response.raise_for_status() assert response.json() == {"name": "valid", "price": 1.0, "owner_ids": None} def test_coerce(): response = client.get("/items/coerce") response.raise_for_status() assert response.json() == {"name": "coerce", "price": 1.0, "owner_ids": None} def test_validlist():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Aug 03 12:29:07 GMT 2020 - 1.4K bytes - Viewed (0) -
tests/test_validate_response.py
def test_valid_none_data(): response = client.get("/items/validnone") data = response.json() assert response.status_code == 200 assert data == {"name": "invalid", "price": 3.2, "owner_ids": None} def test_valid_none_none(): response = client.get("/items/validnone", params={"send_none": "true"}) data = response.json() assert response.status_code == 200 assert data is None
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2K bytes - Viewed (0) -
docs/em/docs/tutorial/response-status-code.md
```Python hl_lines="6" {!../../../docs_src/response_status_code/tutorial001.py!} ``` `201` 👔 📟 "✍". ✋️ 👆 🚫 ✔️ ✍ ⚫️❔ 🔠 👉 📟 ⛓. 👆 💪 ⚙️ 🏪 🔢 ⚪️➡️ `fastapi.status`. ```Python hl_lines="1 6" {!../../../docs_src/response_status_code/tutorial002.py!} ``` 👫 🏪, 👫 🧑🤝🧑 🎏 🔢, ✋️ 👈 🌌 👆 💪 ⚙️ 👨🎨 📋 🔎 👫: <img src="/img/tutorial/response-status-code/image02.png"> !!! note "📡 ℹ"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.4K bytes - Viewed (0) -
tests/test_serialize_response_dataclass.py
def test_coerce(): response = client.get("/items/coerce") response.raise_for_status() assert response.json() == { "name": "coerce", "date": datetime(2021, 7, 26).isoformat(), "price": 1.0, "owner_ids": None, } def test_validlist(): response = client.get("/items/validlist") response.raise_for_status() assert response.json() == [ {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 26 13:56:47 GMT 2022 - 4.9K bytes - Viewed (0) -
docs/ru/docs/tutorial/response-status-code.md
Рассмотрим предыдущий пример еще раз: ```Python hl_lines="6" {!../../../docs_src/response_status_code/tutorial001.py!} ``` `201` – это код статуса "Создано". Но вам не обязательно запоминать, что означает каждый из этих кодов. Для удобства вы можете использовать переменные из `fastapi.status`. ```Python hl_lines="1 6" {!../../../docs_src/response_status_code/tutorial002.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 25 18:44:34 GMT 2023 - 7K bytes - Viewed (0) -
docs/en/docs/tutorial/response-status-code.md
It will: * Return that status code in the response. * Document it as such in the OpenAPI schema (and so, in the user interfaces): <img src="/img/tutorial/response-status-code/image01.png"> !!! note Some response codes (see the next section) indicate that the response does not have a body. FastAPI knows this, and will produce OpenAPI docs that state there is no response body. ## About HTTP status codes !!! note
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 29 14:02:58 GMT 2020 - 4K bytes - Viewed (0) -
docs/de/docs/tutorial/response-status-code.md
# Response-Statuscode So wie ein Responsemodell, können Sie auch einen HTTP-Statuscode für die Response deklarieren, mithilfe des Parameters `status_code`, und zwar in jeder der *Pfadoperationen*: * `@app.get()` * `@app.post()` * `@app.put()` * `@app.delete()` * usw. ```Python hl_lines="6" {!../../../docs_src/response_status_code/tutorial001.py!} ``` !!! note "Hinweis"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:32:57 GMT 2024 - 4.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/response-status-code.md
Vamos ver o exemplo anterior novamente: ```Python hl_lines="6" {!../../../docs_src/response_status_code/tutorial001.py!} ``` `201` é o código de status para "Criado". Mas você não precisa memorizar o que cada um desses códigos significa. Você pode usar as variáveis de conveniência de `fastapi.status`. ```Python hl_lines="1 6" {!../../../docs_src/response_status_code/tutorial002.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Oct 31 16:22:07 GMT 2022 - 4.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/response-status-code.md
再看下之前的例子: ```Python hl_lines="6" {!../../../docs_src/response_status_code/tutorial001.py!} ``` `201` 表示**已创建**的状态码。 但我们没有必要记住所有代码的含义。 可以使用 `fastapi.status` 中的快捷变量。 ```Python hl_lines="1 6" {!../../../docs_src/response_status_code/tutorial002.py!} ``` 这只是一种快捷方式,具有相同的数字代码,但它可以使用编辑器的自动补全功能: <img src="../../../../../../img/tutorial/response-status-code/image02.png"> !!! note "技术细节"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:40:18 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/ko/docs/tutorial/response-status-code.md
## 이름을 기억하는 쉬운 방법 상기 예시 참고: ```Python hl_lines="6" {!../../../docs_src/response_status_code/tutorial001.py!} ``` `201` 은 "생성됨"를 의미하는 상태 코드입니다. 하지만 모든 상태 코드들이 무엇을 의미하는지 외울 필요는 없습니다. `fastapi.status` 의 편의 변수를 사용할 수 있습니다. ```Python hl_lines="1 6" {!../../../docs_src/response_status_code/tutorial002.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 4.8K bytes - Viewed (0)