~/devtools / http-status / 405
tool::http-status-detail

405 Method Not Allowed

The HTTP method is not supported for this resource.

ad · 728×90
상태 코드
405
이름
Method Not Allowed
카테고리
4xx

상세 설명

HTTP 405 Method Not Allowed는 요청에 사용된 HTTP 메서드가 해당 리소스에서 허용되지 않음을 나타냅니다. 예를 들어 GET만 허용된 엔드포인트에 POST 요청을 보냈을 때 발생합니다. 서버는 Allow 헤더에 허용된 메서드 목록을 반드시 포함해야 합니다.

주요 원인
  • 읽기 전용 API에 POST, PUT, DELETE 요청을 보낸 경우
  • 정적 파일 서버에 PUT 또는 DELETE 요청을 보낸 경우
  • API 라우터에서 특정 메서드가 구현되지 않은 경우
  • OPTIONS 대신 다른 메서드로 CORS preflight를 시도한 경우
해결 방법
  • 1.Allow 헤더를 확인하여 허용된 메서드를 사용하세요
  • 2.API 문서에서 해당 엔드포인트가 지원하는 메서드를 확인하세요
  • 3.서버 라우터 설정에서 해당 경로의 메서드 허용 목록을 확인하세요
  • 4.REST API라면 리소스의 성격에 맞는 메서드를 사용하세요 (조회=GET, 생성=POST)

관련 HTTP 헤더

AllowContent-Type

응답 예시

HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD, OPTIONS
Content-Type: application/json

{"error":"method_not_allowed","message":"POST method is not supported for this endpoint"}

관련 상태 코드

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
Cron 표현식 생성기
Cron 표현식을 시각적으로 만들고 파싱합니다. 사람이 읽기 쉬운 설명과 다음 실행 시간을 미리 확인할 수 있습니다.
jwt
JWT 디코더
JWT 토큰을 디코딩하고 분석합니다. 헤더, 페이로드, 서명을 확인할 수 있습니다.
rx
정규식 테스터
정규식을 실시간으로 테스트합니다. 매칭 하이라이트와 설명을 제공합니다.
색상 변환기
HEX, RGB, HSL 등 다양한 형식으로 색상을 변환합니다.