- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for id (0.11 sec)
-
docs/pt/docs/tutorial/handling-errors.md
Neste exemplo, quando o cliente pede, na requisição, por um item cujo ID não existe, a exceção com o status code `404` é lançada: ```Python hl_lines="11" {!../../../docs_src/handling_errors/tutorial001.py!} ``` ### A response resultante Se o cliente faz uma requisição para `http://example.com/items/foo` (um `item_id` `"foo"`), esse cliente receberá um HTTP status code 200, e uma resposta JSON: ``` {
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10K bytes - Viewed (0) -
docs/de/docs/tutorial/handling-errors.md
Im folgenden Beispiel lösen wir, wenn der Client eine ID anfragt, die nicht existiert, eine Exception mit dem Statuscode `404` aus. ```Python hl_lines="11" {!../../../docs_src/handling_errors/tutorial001.py!} ``` ### Die resultierende Response Wenn der Client `http://example.com/items/foo` anfragt (ein `item_id` `"foo"`), erhält dieser Client einen HTTP-Statuscode 200 und folgende JSON-Response: ```JSON
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:29 GMT 2024 - 10.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
В данном примере, когда клиент запрашивает элемент по несуществующему ID, возникает исключение со статус-кодом `404`: ```Python hl_lines="11" {!../../../docs_src/handling_errors/tutorial001.py!} ``` ### Возвращаемый ответ Если клиент запросит `http://example.com/items/foo` (`item_id` `"foo"`), то он получит статус-код 200 и ответ в формате JSON: ```JSON { "item": "The Foo Wrestlers"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.5K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
In this example, when the client requests an item by an ID that doesn't exist, raise an exception with a status code of `404`: ```Python hl_lines="11" {!../../../docs_src/handling_errors/tutorial001.py!} ``` ### The resulting response If the client requests `http://example.com/items/foo` (an `item_id` `"foo"`), that client will receive an HTTP status code of 200, and a JSON response of: ```JSON
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.4K bytes - Viewed (0) -
docs/ja/docs/tutorial/handling-errors.md
値を返す`return`よりも例外を発生させることの利点は、「依存関係とセキュリティ」のセクションでより明確になります。 この例では、クライアントが存在しないIDでアイテムを要求した場合、`404`のステータスコードを持つ例外を発生させます: ```Python hl_lines="11" {!../../../docs_src/handling_errors/tutorial001.py!} ``` ### レスポンス結果 クライアントが`http://example.com/items/foo`(`item_id` `"foo"`)をリクエストすると、HTTPステータスコードが200で、以下のJSONレスポンスが返されます: ```JSON { "item": "The Foo Wrestlers" } ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/em/docs/tutorial/handling-errors.md
{!../../../docs_src/handling_errors/tutorial001.py!} ``` ### 📉 📨 🚥 👩💻 📨 `http://example.com/items/foo` ( `item_id` `"foo"`), 👈 👩💻 🔜 📨 🇺🇸🔍 👔 📟 2️⃣0️⃣0️⃣, & 🎻 📨: ```JSON { "item": "The Foo Wrestlers" } ``` ✋️ 🚥 👩💻 📨 `http://example.com/items/bar` (🚫-🚫 `item_id` `"bar"`), 👈 👩💻 🔜 📨 🇺🇸🔍 👔 📟 4️⃣0️⃣4️⃣ ("🚫 🔎" ❌), & 🎻 📨: ```JSON { "detail": "Item not found" } ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.3K bytes - Viewed (0)