본문 바로가기

TIL

TIL) res.status

자주 사용하는 status

  • 200 OK 성공했을 때
  • 201 Created 새로 뭔가가 만들어졌을 때
  • 400 Bad request 요청이 syntax 에러로 이해 불가능한 상태일 때
  • 401 Unauthorized 유저의 승인이 필요한 request일 때
  • 403 Forbidden 금지된 request 일 때
  • 500 Internal Server Error 서버 내에서 작동 오류가 있을 때

 

참고

 

HTTP/1.1: Status Code Definitions

part of Hypertext Transfer Protocol -- HTTP/1.1 RFC 2616 Fielding, et al. 10 Status Code Definitions Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response. 10.1 Inform

www.w3.org