You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
HTTP 상태코드
✅상태 코드
클라이언트가 보낸 요청의 처리 상태를 응답에서 알려주는 기능
1xx (Informational): 요청이 수신되어 처리중
2xx (Successful): 요청 정상 처리
3xx (Redirection): 요청을 완료하려면 추가 행동이 필요
4xx (Client Error): 클라이언트 오류, 잘못된 문법등으로 서버가 요청을 수행할 수 없음
5xx (Server Error): 서버 오류, 서버가 정상 요청을 처리하지 못함
✅만약 모르는 상태 코드가 나타난다면?
예)
1️⃣ 1xx (Informational)
요청이 수신되어 처리중
2️⃣2xx (Successful)
클라이언트의 요청을 성공적으로 처리
200 - OK
201 - Created
202 - Accepted
204 - No Content
200 - OK
202 - Accepted
204 No Content
3️⃣ 3xx (Redirection)
요청을 완료하기 위해 유저 에이전트의 추가 조치 필요
✅리다이렉션 이해
(리다이렉트)
✅리다이렉션의 종류
➡️영구 리다이렉션 - 301, 308
➡️일시적인 리다이렉션 - 302, 307, 303
➡️PRG: Post/Redirect/Get
POST로 주문후에 웹 브라우저를 새로고침하면?
새로고침은 다시 요청
중복 주문이 될 수 있다.
PRG 사용 전
✅302. 307, 303 정리
✅기타 리다이렉션
4️⃣4xx - 클라이언트 오류, 5xx - 서버 오류
✅4xx (Client Error)
➡️400 Bad Request
클라이언트가 잘못된 요청을 해서 서버가 요청을 처리할 수 없음
➡️401 Unauthorized
클라이언트가 해당 리소스에 대한 인증이 필요함
➡️403 Forbidden
서버가 요청을 이해했지만 승인을 거부함
➡️404 Not Found
요청 리소스를 찾을 수 없음
✅5xx (Server Error)
➡️500 Internal Server Error
서버 문제로 오류 발생, 애매하면 500 오류
➡️500 Internal Server Error
서버 문제로 오류 발생, 애매하면 500 오류
➡️503 Service Unavailable
서비스 이용 불가
🔗출처
All reactions