Search Options

Results per page
Sort
Preferred Languages
Advance

Results 561 - 570 of 603 for Statuscode (0.07 sec)

  1. docs/ru/docs/tutorial/path-operation-configuration.md

    Помните, что эти параметры передаются непосредственно *декоратору операций пути*, а не вашей *функции-обработчику операций пути*.
    
    ///
    
    ## Статус-код ответа { #response-status-code }
    
    Вы можете определить (HTTP) `status_code`, который будет использован в ответах вашей *операции пути*.
    
    Вы можете передать только `int`-значение кода, например `404`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/path-operation-configuration.md

    Notice that these parameters are passed directly to the *path operation decorator*, not to your *path operation function*.
    
    ///
    
    ## Response Status Code { #response-status-code }
    
    You can define the (HTTP) `status_code` to be used in the response of your *path operation*.
    
    You can pass directly the `int` code, like `404`.
    
    But if you don't remember what each number code is for, you can use the shortcut constants in `status`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  3. tests/main.py

        return f"foo bar {query}"
    
    
    @app.get("/query/param-required/int")
    def get_query_param_required_type(query: int = Query()):
        return f"foo bar {query}"
    
    
    @app.get("/enum-status-code", status_code=http.HTTPStatus.CREATED)
    def get_enum_status_code():
        return "foo bar"
    
    
    @app.get("/query/frozenset")
    def get_query_type_frozenset(query: frozenset[int] = Query(...)):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  4. fastapi/applications.py

            app = FastAPI()
    
            @app.head("/items/", status_code=204)
            def get_items_headers(response: Response):
                response.headers["X-Cat-Dog"] = "Alone in the world"
            ```
            """
            return self.router.head(
                path,
                response_model=response_model,
                status_code=status_code,
                tags=tags,
                dependencies=dependencies,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 176.3K bytes
    - Viewed (0)
  5. tests/test_dependency_partial.py

                "partial-asynchronous-method-gen-dependency",
            ),
        ],
    )
    def test_dependency_types_with_partial(route: str, value: str) -> None:
        response = client.get(route)
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/path-operation-configuration.md

    Ten en cuenta que estos parámetros se pasan directamente al *path operation decorator*, no a tu *path operation function*.
    
    ///
    
    ## Código de Estado del Response { #response-status-code }
    
    Puedes definir el `status_code` (HTTP) que se utilizará en el response de tu *path operation*.
    
    Puedes pasar directamente el código `int`, como `404`.
    
    Pero si no recuerdas para qué es cada código numérico, puedes usar las constantes atajo en `status`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/path-operation-configuration.md

    Observe que esses parâmetros são passados diretamente para o *decorador de operação de rota*, não para a sua *função de operação de rota*.
    
    ///
    
    ## Código de Status da Resposta { #response-status-code }
    
    Você pode definir o `status_code` (HTTP) para ser usado na resposta da sua *operação de rota*.
    
    Você pode passar diretamente o código `int`, como `404`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  8. docs/ru/docs/advanced/additional-status-codes.md

    Чтобы добиться этого, импортируйте `JSONResponse` и верните туда свой контент напрямую, установив нужный вам `status_code`:
    
    {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
    
    /// warning | Внимание
    
    Когда вы возвращаете `Response` напрямую, как в примере выше, он будет возвращён как есть.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  9. docs/ru/docs/advanced/custom-response.md

    ### `Response` { #response }
    
    Базовый класс `Response`, от него наследуются все остальные ответы.
    
    Его можно возвращать напрямую.
    
    Он принимает следующие параметры:
    
    - `content` — `str` или `bytes`.
    - `status_code` — целое число, HTTP статус-код.
    - `headers` — словарь строк.
    - `media_type` — строка, задающая тип содержимого. Например, `"text/html"`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  10. docs/ja/docs/advanced/additional-status-codes.md

    例えば、itemを更新し、成功した場合は200 "OK"のHTTPステータスコードを返す *path operation* を作りたいとします。
    
    しかし、新しいitemも許可したいです。itemが存在しない場合は、それらを作成して201 "Created"を返します。
    
    これを達成するには、 `JSONResponse` をインポートし、 `status_code` を設定して直接内容を返します。
    
    {* ../../docs_src/additional_status_codes/tutorial001.py hl[4,25] *}
    
    /// warning | 注意
    
    上記の例のように `Response` を明示的に返す場合、それは直接返されます。
    
    モデルなどはシリアライズされません。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top