tool::http-status-detail
200 OK
The request has succeeded.
ステータスコード
200
名前
OK
カテゴリ
2xx詳細説明
HTTP 200 OKは、クライアントのリクエストが正常に処理されたことを示す最も基本的な成功ステータスコードです。GETリクエストではリソースがレスポンスボディに含まれ、POSTリクエストでは処理結果が返されます。Webブラウザ・APIクライアントを問わず、最も頻繁に受け取るレスポンスコードです。
主な原因
- ▸GETリクエストでリソースを正常に取得した場合
- ▸POSTリクエストが正常に処理された場合
- ▸PUT/PATCHでリソースの更新が完了した場合
- ▸HEADリクエストでリソースの存在を確認した場合
解決方法
- 1.200は正常なレスポンスのため、修正は不要です
- 2.新しいリソースの作成時には200ではなく201 Createdを使用してください
- 3.レスポンスボディがない場合は204 No Contentの方が適切です
- 4.キャッシュを活用するにはETag、Last-Modifiedヘッダーを併せて送信してください
関連HTTPヘッダー
Content-TypeContent-LengthETagCache-ControlLast-Modifiedレスポンス例
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 27
{"status":"ok","id":12345}関連ステータスコード
201CreatedThe request has been fulfilled and a new resource has been created.→202AcceptedThe request has been accepted but not yet acted upon.→203Non-Authoritative InformationThe response is from a transforming proxy, not the origin server.→204No ContentThe server successfully processed the request but returns no content.→205Reset ContentThe server processed the request; the client should reset the document view.→
ad · 300×250
// related tools