Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 4,885 for Code (0.17 sec)

  1. docs/ja/docs/tutorial/response-status-code.md

    * `@app.get()`
    * `@app.post()`
    * `@app.put()`
    * `@app.delete()`
    * など。
    
    ```Python hl_lines="6"
    {!../../../docs_src/response_status_code/tutorial001.py!}
    ```
    
    !!! note "備考"
        `status_code`は「デコレータ」メソッド(`get`、`post`など)のパラメータであることに注意してください。すべてのパラメータやボディのように、*path operation関数*のものではありません。
    
    `status_code`パラメータはHTTPステータスコードを含む数値を受け取ります。
    
    !!! info "情報"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 15 15:42:08 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. ci/official/utilities/code_check_changed_files.bats

        fi
    }
    
    # Note: this is excluded on the full code base, since any submitted code must
    # have passed Google's internal style guidelines.
    @test "Check buildifier formatting on BUILD files" {
        echo "buildifier formatting is recommended. Here are the suggested fixes:"
        echo "============================="
        grep -e 'BUILD' $BATS_FILE_TMPDIR/changed_files \
            | xargs buildifier -v -mode=diff -diff_command="git diff --no-index"
    }
    
    Plain Text
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Jan 10 19:39:41 GMT 2024
    - 4K bytes
    - Viewed (0)
  3. ci/official/containers/linux_arm64/devel.usertools/code_check_changed_files.bats

        fi
    }
    
    # Note: this is excluded on the full code base, since any submitted code must
    # have passed Google's internal style guidelines.
    @test "Check buildifier formatting on BUILD files" {
        echo "buildifier formatting is recommended. Here are the suggested fixes:"
        echo "============================="
        grep -e 'BUILD' $BATS_FILE_TMPDIR/changed_files \
            | xargs buildifier -v -mode=diff -diff_command="git diff --no-index"
    }
    
    Plain Text
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 14:52:45 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/response-change-status-code.md

    & ⤴️ 👆 💪 ⚒ `status_code` 👈 *🔀* 📨 🎚.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    & ⤴️ 👆 💪 📨 🙆 🎚 👆 💪, 👆 🛎 🔜 ( `dict`, 💽 🏷, ♒️).
    
    & 🚥 👆 📣 `response_model`, ⚫️ 🔜 ⚙️ ⛽ & 🗜 🎚 👆 📨.
    
    **FastAPI** 🔜 ⚙️ 👈 *🔀* 📨 ⚗ 👔 📟 (🍪 & 🎚), & 🔜 🚮 👫 🏁 📨 👈 🔌 💲 👆 📨, ⛽ 🙆 `response_model`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/response-change-status-code.md

    You probably read before that you can set a default [Response Status Code](../tutorial/response-status-code.md){.internal-link target=_blank}.
    
    But in some cases you need to return a different status code than the default.
    
    ## Use case
    
    For example, imagine that you want to return an HTTP status code of "OK" `200` by default.
    
    But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  6. docs/es/docs/advanced/response-change-status-code.md

    # Response - Cambiar el Status Code
    
    Probablemente ya has leído con anterioridad que puedes establecer un [Response Status Code](../tutorial/response-status-code.md){.internal-link target=_blank} por defecto.
    
    Pero en algunos casos necesitas retornar un status code diferente al predeterminado.
    
    ## Casos de uso
    
    Por ejemplo, imagina que quieres retornar un HTTP status code de "OK" `200` por defecto.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Feb 06 19:56:23 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/response-change-status-code.md

    Anschließend können Sie den `status_code` in diesem *vorübergehenden* Response-Objekt festlegen.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    Und dann können Sie wie gewohnt jedes benötigte Objekt zurückgeben (ein `dict`, ein Datenbankmodell usw.).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:18:58 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/response-change-status-code.md

    你可能之前已经了解到,你可以设置默认的[响应状态码](../tutorial/response-status-code.md){.internal-link target=_blank}。
    
    但在某些情况下,你需要返回一个不同于默认值的状态码。
    
    ## 使用场景
    
    例如,假设你想默认返回一个HTTP状态码为“OK”`200`。
    
    但如果数据不存在,你想创建它,并返回一个HTTP状态码为“CREATED”`201`。
    
    但你仍然希望能够使用`response_model`过滤和转换你返回的数据。
    
    对于这些情况,你可以使用一个`Response`参数。
    
    ## 使用 `Response` 参数
    
    你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。
    
    然后你可以在这个*临时*响应对象中设置`status_code`。
    
    ```Python hl_lines="1  9  12"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 10 20:30:28 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  9. ci/official/code_check_changed_files.sh

    # limitations under the License.
    # ==============================================================================
    source "${BASH_SOURCE%/*}/utilities/setup.sh"
    
    Shell Script
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Oct 05 18:41:59 GMT 2023
    - 850 bytes
    - Viewed (0)
  10. tests/test_response_code_no_body.py

    client = TestClient(app)
    
    
    def test_get_response():
        response = client.get("/a")
        assert response.status_code == 204, response.text
        assert "content-length" not in response.headers
        assert response.content == b""
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
Back to top