Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for HTTPStatus (0.04 sec)

  1. tests/test_return_none_stringified_annotations.py

    
    def test_no_content():
        app = FastAPI()
    
        @app.get("/no-content", status_code=http.HTTPStatus.NO_CONTENT)
        def return_no_content() -> "None":
            return
    
        client = TestClient(app)
        response = client.get("/no-content")
        assert response.status_code == http.HTTPStatus.NO_CONTENT, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 18:44:43 UTC 2025
    - 431 bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/mylasta/direction/sponsor/FessApiFailureHook.java

        }
    
        @Override
        public ApiResponse handleApplicationException(final ApiFailureResource resource, final RuntimeException cause) {
            if (cause instanceof LoginUnauthorizedException) {
                return asJson(createFailureBean(Status.UNAUTHORIZED, "Unauthorized request.")).httpStatus(HTTP_UNAUTHORIZED);
            }
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/response-status-code.md

    /// info | Info
    
    Alternativ kann `status_code` auch ein `IntEnum` erhalten, wie etwa Pythons <a href="https://docs.python.org/3/library/http.html#http.HTTPStatus" class="external-link" target="_blank">`http.HTTPStatus`</a>.
    
    ///
    
    Dies wird:
    
    * Diesen Statuscode mit der Response zurücksenden.
    * Diesen im OpenAPI-Schema dokumentieren (und somit in den Benutzeroberflächen):
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/response-status-code.md

    /// info | Информация
    
    В качестве значения параметра `status_code` также может использоваться `IntEnum`, например, из библиотеки <a href="https://docs.python.org/3/library/http.html#http.HTTPStatus" class="external-link" target="_blank">`http.HTTPStatus`</a> в Python.
    
    ///
    
    Это позволит:
    
    * Возвращать указанный код статуса в ответе.
    * Документировать его как код статуса ответа в OpenAPI схеме (а значит, и в пользовательских интерфейсах):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/response-status-code.md

    /// info | Información
    
    `status_code` también puede recibir un `IntEnum`, como por ejemplo el <a href="https://docs.python.org/3/library/http.html#http.HTTPStatus" class="external-link" target="_blank">`http.HTTPStatus`</a> de Python.
    
    ///
    
    Esto hará:
    
    * Devolver ese código de estado en el response.
    * Documentarlo como tal en el esquema de OpenAPI (y por lo tanto, en las interfaces de usuario):
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/response-status-code.md

    /// info | Informação
    
    `status_code` também pode receber um `IntEnum`, como o do Python <a href="https://docs.python.org/3/library/http.html#http.HTTPStatus" class="external-link" target="_blank">`http.HTTPStatus`</a>.
    
    ///
    
    Dessa forma:
    
    * Este código de status será retornado na resposta.
    * Será documentado como tal no esquema OpenAPI (e, portanto, nas interfaces do usuário):
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/response-status-code.md

    /// info
    
    `status_code` can alternatively also receive an `IntEnum`, such as Python's <a href="https://docs.python.org/3/library/http.html#http.HTTPStatus" class="external-link" target="_blank">`http.HTTPStatus`</a>.
    
    ///
    
    It will:
    
    * Return that status code in the response.
    * Document it as such in the OpenAPI schema (and so, in the user interfaces):
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpStatusCodes.kt

    //
    // https://datatracker.ietf.org/doc/html/rfc7231#page-47
    //
    // From https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
    
    /** `100 Continue` (HTTP/1.1 - RFC 7231)  */
    const val HTTP_CONTINUE = 100
    
    /** `101 Switching Protocols` (HTTP/1.1 - RFC 9110)  */
    const val HTTP_SWITCHING_PROTOCOLS = 101
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 2K bytes
    - Viewed (0)
  9. tests/main.py

    
    @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(...)):
        return ",".join(map(str, sorted(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)
  10. src/main/java/org/codelibs/fess/helper/ViewHelper.java

            final ResponseData responseData = client.execute(RequestDataBuilder.newRequestData().get().url(url).build());
            if (responseData.getHttpStatusCode() == 404) {
                response.httpStatus(responseData.getHttpStatusCode());
                CloseableUtil.closeQuietly(responseData);
                return response;
            }
            writeFileName(response, responseData);
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Fri Nov 28 16:29:12 UTC 2025
    - 52.6K bytes
    - Viewed (0)
Back to top