Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for status_code (0.78 sec)

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

    * `@app.get()`
    * `@app.post()`
    * `@app.put()`
    * `@app.delete()`
    * etc.
    
    {* ../../docs_src/response_status_code/tutorial001.py hl[6] *}
    
    /// note
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 4K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/response-change-status-code.md

    ## Use a `Response` parameter { #use-a-response-parameter }
    
    You can declare a parameter of type `Response` in your *path operation function* (as you can do for cookies and headers).
    
    And then you can set the `status_code` in that *temporal* response object.
    
    {* ../../docs_src/response_change_status_code/tutorial001.py hl[1,9,12] *}
    
    And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  3. docs/ru/docs/advanced/response-change-status-code.md

    ## Использование параметра `Response`
    
    Вы можете объявить параметр типа `Response` в вашей *функции обработки пути* (так же как для cookies и headers).
    
    И затем вы можете установить `status_code` в этом *временном* объекте ответа.
    
    {* ../../docs_src/response_change_status_code/tutorial001.py hl[1,9,12] *}
    
    После этого вы можете вернуть любой объект, который вам нужен, как обычно (`dict`, модель базы данных и т.д.).
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Jun 16 11:11:10 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/custom-response.md

    If you do that, then you can return the URL directly from your *path operation* function.
    
    In this case, the `status_code` used will be the default one for the `RedirectResponse`, which is `307`.
    
    ---
    
    You can also use the `status_code` parameter combined with the `response_class` parameter:
    
    {* ../../docs_src/custom_response/tutorial006c.py hl[2,7,9] *}
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/additional-status-codes.md

    To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want:
    
    {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
    
    /// warning
    
    When you return a `Response` directly, like in the example above, it will be returned directly.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2K bytes
    - Viewed (0)
  6. 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 Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  7. 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 Sep 07 07:19:17 UTC 2025
    - Last Modified: Fri Jul 04 05:17:17 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/additional-responses.md

    ///
    
    ## Combining information { #combining-information }
    
    You can also combine response information from multiple places, including the `response_model`, `status_code`, and `responses` parameters.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/path-operation-advanced-configuration.md

    {* ../../docs_src/path_operation_advanced_configuration/tutorial004.py hl[19:29] *}
    
    ## Additional Responses { #additional-responses }
    
    You probably have seen how to declare the `response_model` and `status_code` for a *path operation*.
    
    That defines the metadata about the main response of a *path operation*.
    
    You can also declare additional responses with their models, status codes, etc.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/exception/WebApiExceptionTest.java

        public void test_statusCode_variousHttpCodes() {
            // Test with various HTTP status codes
            int[] statusCodes = { 200, 201, 400, 401, 403, 404, 500, 502, 503 };
    
            for (int statusCode : statusCodes) {
                WebApiException exception = new WebApiException(statusCode, "Test message");
                assertEquals(statusCode, exception.getStatusCode());
            }
        }
    
        public void test_statusCode_negativeValue() {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top