tool::http-status-detail
204 No Content
The server successfully processed the request but returns no content.
상태 코드
204
이름
No Content
카테고리
2xx상세 설명
HTTP 204 No Content는 요청이 성공적으로 처리되었지만 반환할 콘텐츠가 없음을 나타냅니다. DELETE, PUT, PATCH 요청 후 응답 본문 없이 성공을 알릴 때 주로 사용합니다. 브라우저는 204 응답 시 현재 페이지를 유지하며 리다이렉트하지 않습니다.
주요 원인
- ▸DELETE 요청으로 리소스를 성공적으로 삭제한 경우
- ▸PUT/PATCH 요청으로 리소스를 업데이트했지만 본문을 반환하지 않는 경우
- ▸OPTIONS preflight 요청에 대한 CORS 응답
- ▸폼 제출 후 현재 페이지 상태를 유지하려는 경우
해결 방법
- 1.204는 정상 응답이므로 수정이 필요하지 않습니다
- 2.응답 본문이 필요하다면 200 OK와 함께 반환하세요
- 3.생성된 리소스 정보가 필요하다면 201 Created를 사용하세요
- 4.204 응답에는 절대 본문을 포함하지 마세요 (HTTP 표준 위반)
관련 HTTP 헤더
Cache-ControlETag응답 예시
HTTP/1.1 204 No Content Cache-Control: no-cache
관련 상태 코드
200OKThe request has succeeded.→201CreatedThe request has been fulfilled and a new resource has been created.→202AcceptedThe request has been accepted but not yet acted upon.→203Non-Authoritative InformationThe response is from a transforming proxy, not the origin server.→205Reset ContentThe server processed the request; the client should reset the document view.→
ad · 300×250
// related tools