- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for status_code (0.07 sec)
-
docs/en/docs/tutorial/response-status-code.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 4K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
docs/en/docs/release-notes.md
try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username:
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Fri Sep 05 12:48:45 UTC 2025 - 544.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/exception/WebApiException.java
super(message); this.statusCode = statusCode; } /** * Constructs a WebApiException with the specified status code and exception. * * @param statusCode The HTTP status code * @param e The exception that caused this WebApiException */ public WebApiException(final int statusCode, final Exception e) { this(statusCode, e.getMessage(), e);
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 2.3K bytes - Viewed (0)