0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

HTTP ステータスコードをなるべく暗記しないで理解する

Last updated at Posted at 2025-05-05

HTTP/1.0の設計時のステータスコードのざっくりした内容 

1xx: 今は使わないが将来用にとっておくよ

2xx: あなたの送った情報は受信できて理解できたよ

3xx: 追加の行動が必要だよ(リダイレクション)

4xx: あんたの送った要求はなんかおかしいよ(クライアントエラー)

5xx: 私のミスであなたの要求には答えられないよ(クライアントエラー)

現在のステータスコード(1.0と比較すると1xx以外は同じ)

1xx: 情報処理中(例えば画像の種類の情報を先に送ってくれたりする)

2xx: 成功

200 OK
例 Webページが正常に表示されたよ

201 Created
新しい投稿がうまくいったよ

204 No Content 
削除できたよ! いいねボタンの処理成功!(サーバーから返すものはないがこのステータスコードを受けてクライアント側でいいねボタンのデザインを変更する)

3xx: リダイレクション

4xx: クライアントエラー

400 Bad Request 
文章が理解できません

401 Unauthorized 
ちゃんとログインしてないでしょ

404 Not Found 
住所間違えてない?ページがないよ

5xx: サーバーエラー

Informational responses (100 – 199)
Successful responses (200 – 299)
Redirection messages (300 – 399)
Client error responses (400 – 499)
Server error responses (500 – 599)

参考文献

https://www.rfc-editor.org/rfc/rfc1945#section-6.1.1
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?