Others

HTTP 응답 상태 코드

selonjulie 2022. 11. 13. 22:28

총 5개 번호대가 존재

 

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

 

Successful responses (200 – 299)

200 Ok

201 Created: POST, PUT 요청이 보내왔을 때

204 No content : 바디가 없을 때 (헤더는 존재할수도)

 

Client error responses (400 – 499)

400 Bad request: 서버가 요청을 이해할 수 없음

401 Unauthorized: 비인증(unauthenticated)을 의미, 인증이 필요함

404 Not found: 서버가 요청받은 리소스를 찾을 수 없을 때, 알려지지 않은 URL

409 Conflict: 요청이 현재 서버의 상태와 충돌될 때

410 Gone: 요청한 콘텐츠가 서버에서 영구적으로 삭제 되었을 때, 주소가 존재하지 않을 때

 

Server error responses (500 – 599)

500 Internal server error: 서버가 처리하는 방법을 모를 때

502 Bad gateway: 서버가 요청을 처리할때 응답을 얻기위해 게이트웨이 작업할때 잘못된 응답 수신

 

참고)

MDN | HTTP response status codes