Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 29 for 204 (0.2 seconds)

  1. tests/test_starlette_exception.py

    
    @app.get("/http-no-body-statuscode-exception")
    async def no_body_status_code_exception():
        raise HTTPException(status_code=204)
    
    
    @app.get("/http-no-body-statuscode-with-detail-exception")
    async def no_body_status_code_with_detail_exception():
        raise HTTPException(status_code=204, detail="I should just disappear!")
    
    
    @app.get("/starlette-items/{item_id}")
    async def read_starlette_item(item_id: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/response-status-code.md

        * `200` is the default status code, which means everything was "OK".
        * Another example would be `201`, "Created". It is commonly used after creating a new record in the database.
        * A special case is `204`, "No Content".  This response is used when there is no content to return to the client, and so the response must not have a body.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 3.9K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/tutorial/response-status-code.md

    這些狀態碼有對應的名稱以便辨識,但重點是數字本身。
    
    簡而言之:
    
    * `100 - 199` 表示「資訊」。你很少會直接使用它們。這些狀態碼的回應不可包含本文。
    * **`200 - 299`** 表示「成功」。這是你最常使用的一組。
        * `200` 是預設狀態碼,表示一切「OK」。
        * 另一個例子是 `201`,代表「已建立」。常用於在資料庫中建立新紀錄之後。
        * 一個特殊情況是 `204`,代表「無內容」。當沒有內容要回傳給用戶端時使用,因此回應不得有本文。
    * **`300 - 399`** 表示「重新導向」。這些狀態碼的回應可能有或沒有本文,唯獨 `304`(「未修改」)必須沒有本文。
    * **`400 - 499`** 表示「用戶端錯誤」。這大概是你第二常用的一組。
        * 例如 `404`,代表「找不到」。
        * 對於一般性的用戶端錯誤,你可以使用 `400`。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  4. docs/ja/docs/tutorial/response-status-code.md

    * **`200 - 299`** は「成功」のレスポンスのためのものです。これらは最も利用するであろうものです。
        * `200`はデフォルトのステータスコードで、すべてが「OK」であったことを意味します。
        * 別の例としては、`201`(Created)があります。これはデータベースに新しいレコードを作成した後によく使用されます。
        * 特殊なケースとして、`204`(No Content)があります。このレスポンスはクライアントに返すコンテンツがない場合に使用されるため、レスポンスはボディを持ってはいけません。
    * **`300 - 399`** は「リダイレクト」のためのものです。これらのステータスコードを持つレスポンスは`304`(Not Modified)を除き、ボディを持つことも持たないこともできます。`304`はボディを持ってはいけません。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 5.6K bytes
    - Click Count (0)
  5. src/main/webapp/css/chat.css

    Shinsuke Sugaya <******@****.***> 1773555717 +0900
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Mar 15 06:21:57 GMT 2026
    - 19.4K bytes
    - Click Count (0)
  6. fastapi/utils.py

    Sebastián Ramírez <******@****.***> 1770835281 -0800
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:41:21 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

        assertThat(response.body.bytes().size).isEqualTo(0)
        assertThat(response.body.contentLength()).isEqualTo(0)
    
        // Content-Length header doesn't exist in a 204 response.
        assertThat(response.header("content-length")).isNull()
        assertThat(response.code).isEqualTo(204)
        val request = server.takeRequest()
        assertThat(request.requestLine).isEqualTo("GET /foo HTTP/2")
      }
    
      @Test
      fun head() {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 67.5K bytes
    - Click Count (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Hpack.kt

          Header(TARGET_PATH, "/"),
          Header(TARGET_PATH, "/index.html"),
          Header(TARGET_SCHEME, "http"),
          Header(TARGET_SCHEME, "https"),
          Header(RESPONSE_STATUS, "200"),
          Header(RESPONSE_STATUS, "204"),
          Header(RESPONSE_STATUS, "206"),
          Header(RESPONSE_STATUS, "304"),
          Header(RESPONSE_STATUS, "400"),
          Header(RESPONSE_STATUS, "404"),
          Header(RESPONSE_STATUS, "500"),
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:02:18 GMT 2026
    - 23.2K bytes
    - Click Count (0)
  9. .teamcity/performance-test-durations.json

      "durations" : [ {
        "testProject" : "withVerboseJUnit",
        "linux" : 210
      }, {
        "testProject" : "withVerboseTestNG",
        "linux" : 204
      } ]
    }, {
      "scenario" : "org.gradle.performance.regression.inception.BuildSrcApiChangePerformanceTest.buildSrc abi change",
      "durations" : [ {
        "testProject" : "largeJavaMultiProject",
        "linux" : 669
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Mon Mar 23 04:45:09 GMT 2026
    - 26.1K bytes
    - Click Count (0)
  10. tests/test_response_code_no_body.py

        title: str
    
    
    class JsonApiError(BaseModel):
        errors: list[Error]
    
    
    @app.get(
        "/a",
        status_code=204,
        response_class=JsonApiResponse,
        responses={500: {"description": "Error", "model": JsonApiError}},
    )
    async def a():
        pass
    
    
    @app.get("/b", responses={204: {"description": "No Content"}})
    async def b():
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 3.5K bytes
    - Click Count (0)
Back to Top