1
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?

Laravelの基本的なステータスコード

1
Posted at

LaravelのFeatureテストでよく使うHTTPステータスコードを、API開発・テストの文脈でまとめます。

主要ステータスコード一覧

コード 定数名 用途例(Laravel API)
200 HTTP_OK GET一覧取得成功、更新成功
201 HTTP_CREATED POST新規作成成功
204 HTTP_NO_CONTENT DELETE成功(返却データなし)
400 HTTP_BAD_REQUEST リクエストパラメータ不正
401 HTTP_UNAUTHORIZED 認証失敗(トークン無効)
403 HTTP_FORBIDDEN 認可エラー(権限不足)
404 HTTP_NOT_FOUND リソース存在しない
422 HTTP_UNPROCESSABLE_ENTITY バリデーションエラー
1
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
1
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?