Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for 404 (0.16 sec)

  1. docs/zh/docs/advanced/additional-responses.md

    您可以向路径操作装饰器传递参数 `responses` 。
    
    它接收一个 `dict`,键是每个响应的状态代码(如`200`),值是包含每个响应信息的其他 `dict`。
    
    每个响应字典都可以有一个关键模型,其中包含一个 `Pydantic` 模型,就像 `response_model` 一样。
    
    **FastAPI**将采用该模型,生成其`JSON Schema`并将其包含在`OpenAPI`中的正确位置。
    
    例如,要声明另一个具有状态码 `404` 和`Pydantic`模型 `Message` 的响应,可以写:
    ```Python hl_lines="18  22"
    {!../../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    
    !!! Note
    	请记住,您必须直接返回 `JSONResponse` 。
    
    !!! Info
    	`model` 密钥不是OpenAPI的一部分。
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 15:53:39 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/conditional-openapi.md

    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Then if you go to the URLs at `/openapi.json`, `/docs`, or `/redoc` you will just get a `404 Not Found` error like:
    
    ```JSON
    {
        "detail": "Not Found"
    }
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt

        val request =
          Request.Builder()
            .url("https://valid-isrgrootx1.letsencrypt.org/robots.txt")
            .build()
        client.newCall(request).execute().use { response ->
          assertThat(response.code).isEqualTo(404)
          assertThat(response.protocol).isEqualTo(Protocol.HTTP_2)
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (1)
  4. docs/de/docs/advanced/additional-responses.md

    **FastAPI** nimmt dieses Modell, generiert dessen JSON-Schema und fügt es an der richtigen Stelle in OpenAPI ein.
    
    Um beispielsweise eine weitere Response mit dem Statuscode `404` und einem Pydantic-Modell `Message` zu deklarieren, können Sie schreiben:
    
    ```Python hl_lines="18  22"
    {!../../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    !!! note "Hinweis"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:26 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/additional-responses.md

    **FastAPI** will take that model, generate its JSON Schema and include it in the correct place in OpenAPI.
    
    For example, to declare another response with a status code `404` and a Pydantic model `Message`, you can write:
    
    ```Python hl_lines="18  22"
    {!../../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    !!! note
        Keep in mind that you have to return the `JSONResponse` directly.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/path-operation-configuration.md

    ## Response-Statuscode
    
    Sie können den (HTTP-)`status_code` definieren, den die Response Ihrer *Pfadoperation* verwenden soll.
    
    Sie können direkt den `int`-Code übergeben, etwa `404`.
    
    Aber falls Sie sich nicht mehr erinnern, wofür jede Nummer steht, können Sie die Abkürzungs-Konstanten in `status` verwenden:
    
    === "Python 3.10+"
    
        ```Python hl_lines="1  15"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:48 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/path-operation-configuration.md

    ## Коды состояния
    
    Вы можете определить (HTTP) `status_code`, который будет использован в ответах вашей *операции пути*.
    
    Вы можете передать только `int`-значение кода, например `404`.
    
    Но если вы не помните, для чего нужен каждый числовой код, вы можете использовать сокращенные константы в параметре `status`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="1  15"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 8K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/additional-responses.md

    🔠 👈 📨 `dict`Ⓜ 💪 ✔️ 🔑 `model`, ⚗ Pydantic 🏷, 💖 `response_model`.
    
    **FastAPI** 🔜 ✊ 👈 🏷, 🏗 🚮 🎻 🔗 &amp; 🔌 ⚫️ ☑ 🥉 🗄.
    
    🖼, 📣 ➕1️⃣ 📨 ⏮️ 👔 📟 `404` &amp; Pydantic 🏷 `Message`, 👆 💪 ✍:
    
    ```Python hl_lines="18  22"
    {!../../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    !!! note
        ✔️ 🤯 👈 👆 ✔️ 📨 `JSONResponse` 🔗.
    
    !!! info
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/handling-errors.md

    The status codes in the 400 range mean that there was an error from the client.
    
    Remember all those **"404 Not Found"** errors (and jokes)?
    
    ## Use `HTTPException`
    
    To return HTTP responses with errors to the client you use `HTTPException`.
    
    ### Import `HTTPException`
    
    ```Python hl_lines="1"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/fr/docs/advanced/additional-responses.md

    **FastAPI** prendra ce modèle, générera son schéma JSON et l'inclura au bon endroit dans OpenAPI.
    
    Par exemple, pour déclarer une autre réponse avec un code HTTP `404` et un modèle Pydantic `Message`, vous pouvez écrire :
    
    ```Python hl_lines="18 22"
    {!../../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    !!! note "Remarque"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
Back to top