- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 1,155 for Status (0.05 seconds)
-
docs/en/docs/advanced/additional-status-codes.md
# Additional Status Codes { #additional-status-codes } By default, **FastAPI** will return the responses using a `JSONResponse`, putting the content you return from your *path operation* inside of that `JSONResponse`. It will use the default status code or the one you set in your *path operation*. ## Additional status codes { #additional-status-codes_1 }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2K bytes - Click Count (0) -
docs/ja/docs/tutorial/response-status-code.md
<img src="/img/tutorial/response-status-code/image02.png"> /// note | 技術詳細 また、`from starlette import status`を使うこともできます。 **FastAPI** は、開発者の利便性を考慮して、fastapi.statusと同じ`starlette.status`を提供しています。しかし、これはStarletteから直接提供されています。 /// ## デフォルトの変更 { #changing-the-default }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 5.6K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/additional-status-codes.md
# 額外的狀態碼 { #additional-status-codes } 在預設情況下,**FastAPI** 會使用 `JSONResponse` 傳回回應,並把你從你的「路徑操作(path operation)」回傳的內容放進該 `JSONResponse` 中。 它會使用預設的狀態碼,或你在路徑操作中設定的狀態碼。 ## 額外的狀態碼 { #additional-status-codes_1 } 如果你想在主要狀態碼之外再回傳其他狀態碼,可以直接回傳一個 `Response`(例如 `JSONResponse`),並直接設定你想要的額外狀態碼。 例如,你想要有一個允許更新項目的路徑操作,成功時回傳 HTTP 狀態碼 200 "OK"。 但你也希望它能接受新項目;當項目先前不存在時就建立它們,並回傳 HTTP 狀態碼 201 "Created"。 要達成這點,匯入 `JSONResponse`,直接在那裡回傳內容,並設定你想要的 `status_code`:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 1.8K bytes - Click Count (0) -
docs/ja/docs/advanced/additional-status-codes.md
# 追加のステータスコード { #additional-status-codes } デフォルトでは、 **FastAPI** は `JSONResponse` を使ってレスポンスを返し、*path operation* から返した内容をその `JSONResponse` の中に入れます。 デフォルトのステータスコード、または *path operation* で設定したステータスコードが使用されます。 ## 追加のステータスコード { #additional-status-codes_1 } メインのステータスコードとは別に追加のステータスコードを返したい場合は、`JSONResponse` のような `Response` を直接返し、追加のステータスコードを直接設定できます。 たとえば、item を更新でき、成功時に HTTP ステータスコード 200 "OK" を返す *path operation* を作りたいとします。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 2.4K bytes - Click Count (0) -
docs/en/docs/tutorial/response-status-code.md
<img src="/img/tutorial/response-status-code/image02.png"> /// note | Technical Details You could also use `from starlette import status`. **FastAPI** provides the same `starlette.status` as `fastapi.status` just as a convenience for you, the developer. But it comes directly from Starlette. /// ## Changing the default { #changing-the-default }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 3.9K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/response-status-code.md
<img src="/img/tutorial/response-status-code/image02.png"> /// note | 技術細節 你也可以使用 `from starlette import status`。 **FastAPI** 將同一個 `starlette.status` 以 `fastapi.status` 形式提供,純粹是為了讓你(開發者)方便。但它直接來自 Starlette。 /// ## 變更預設值 { #changing-the-default }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.7K bytes - Click Count (0) -
docs/en/docs/how-to/authentication-error-status-code.md
# Use Old 403 Authentication Error Status Codes { #use-old-403-authentication-error-status-codes } Before FastAPI version `0.122.0`, when the integrated security utilities returned an error to the client after a failed authentication, they used the HTTP status code `403 Forbidden`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 1.2K bytes - Click Count (0) -
docs/zh-hant/docs/how-to/authentication-error-status-code.md
# 使用舊的 403 身分驗證錯誤狀態碼 { #use-old-403-authentication-error-status-codes } 在 FastAPI 版本 `0.122.0` 之前,當內建的安全工具在身分驗證失敗後回傳錯誤給用戶端時,會使用 HTTP 狀態碼 `403 Forbidden`。 從 FastAPI 版本 `0.122.0` 起,改為使用更合適的 HTTP 狀態碼 `401 Unauthorized`,並在回應中依據 HTTP 規範加上合理的 `WWW-Authenticate` 標頭,參考 [RFC 7235](https://datatracker.ietf.org/doc/html/rfc7235#section-3.1)、[RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-401-unauthorized)。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 1.1K bytes - Click Count (0) -
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). But in some cases you need to return a different status code than the default. ## Use case { #use-case } For example, imagine that you want to return an HTTP status code of "OK" `200` by default.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 1.5K bytes - Click Count (0) -
docs/ja/docs/how-to/authentication-error-status-code.md
# 古い 403 認証エラーのステータスコードを使う { #use-old-403-authentication-error-status-codes } FastAPI バージョン `0.122.0` より前は、統合されたセキュリティユーティリティが認証に失敗してクライアントへエラーを返す際、HTTP ステータスコード `403 Forbidden` を使用していました。 FastAPI バージョン `0.122.0` 以降では、より適切な HTTP ステータスコード `401 Unauthorized` を使用し、HTTP 仕様に従ってレスポンスに妥当な `WWW-Authenticate` ヘッダーを含めます。[RFC 7235](https://datatracker.ietf.org/doc/html/rfc7235#section-3.1), [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-401-unauthorized)。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 1.4K bytes - Click Count (0)