tool::http-status-detail
415 Unsupported Media Type
The media type of the request is not supported.
상태 코드
415
이름
Unsupported Media Type
카테고리
4xx상세 설명
HTTP 415 Unsupported Media Type은 서버가 요청 본문의 미디어 타입을 지원하지 않아 요청을 거부할 때 발생합니다. 클라이언트가 Content-Type 헤더를 잘못 설정하거나 서버가 특정 형식만 허용할 때 나타납니다. API 개발에서 JSON을 기대하는 엔드포인트에 form-data를 보내는 경우가 대표적입니다.
주요 원인
- ▸Content-Type을 application/json으로 설정해야 하는데 text/plain으로 전송
- ▸파일 업로드 엔드포인트에 JSON을 전송 (multipart/form-data 필요)
- ▸XML을 기대하는 서버에 JSON 전송
- ▸Accept 헤더와 Content-Type 헤더 불일치
해결 방법
- 1.API 문서를 확인하여 필요한 Content-Type 헤더를 정확히 설정하세요
- 2.JSON 데이터 전송 시: Content-Type: application/json
- 3.파일 업로드 시: Content-Type: multipart/form-data
- 4.서버 응답 본문에서 허용된 미디어 타입 목록을 확인하세요
관련 HTTP 헤더
Content-TypeAccept응답 예시
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json
{"error":"unsupported_media_type","message":"Content-Type must be application/json","supported":["application/json"]}관련 상태 코드
400Bad RequestThe server could not understand the request due to invalid syntax.→401UnauthorizedAuthentication is required and has failed or not been provided.→402Payment RequiredReserved for future use; some services use it for payment walls.→403ForbiddenThe server refuses to fulfill the request (authenticated but unauthorized).→404Not FoundThe requested resource could not be found.→
ad · 300×250
// related tools