Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for example (0.18 sec)

  1. 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
    
    
    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)
  2. docs/de/docs/tutorial/handling-errors.md

    {!../../../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
    {
      "item": "The Foo Wrestlers"
    }
    ```
    
    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)
  3. docs/ru/docs/tutorial/handling-errors.md

    {!../../../docs_src/handling_errors/tutorial001.py!}
    ```
    
    ### Возвращаемый ответ
    
    Если клиент запросит `http://example.com/items/foo` (`item_id` `"foo"`), то он получит статус-код 200 и ответ в формате JSON:
    
    ```JSON
    {
      "item": "The Foo Wrestlers"
    }
    ```
    
    Но если клиент запросит `http://example.com/items/bar` (несуществующий `item_id` `"bar"`), то он получит статус-код 404 (ошибка "не найдено") и JSON-ответ в виде:
    
    ```JSON
    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)
  4. 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
    
    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)
  5. docs/zh/docs/tutorial/handling-errors.md

    ```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"
    }
    
    ```
    
    但如果客户端请求 `http://example.com/items/bar`(`item_id` `「bar」` 不存在时),则会接收到 HTTP 状态码 - 404(「未找到」错误)及如下 JSON 响应结果:
    
    ```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.4K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/handling-errors.md

    ```Python hl_lines="11"
    {!../../../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
    {
    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)
  7. docs/ja/docs/tutorial/handling-errors.md

    ```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"
    }
    ```
    
    しかし、クライアントが`http://example.com/items/bar`(存在しない`item_id` `"bar"`)をリクエストした場合、HTTPステータスコード404("not found"エラー)と以下のJSONレスポンスが返されます:
    
    ```JSON
    {
    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)
Back to top