405 Method Not Allowed
The method is known but not allowed for this resource.
| Class | Client error (4xx) |
|---|---|
| Defined in | RFC9110, Section 15.5.6 |
| Cacheable by default | Yes (RFC 9110, section 15.1) |
Common causes
- Sending POST to an endpoint that only accepts GET, or the reverse.
- A route registered for different methods.
What to do
Use an allowed method. The server must send an Allow header listing the supported methods.
Related codes
- 400 Bad Request: The server cannot process the request because it looks malformed.
- 404 Not Found: The server cannot find the requested resource.
- 501 Not Implemented: The server does not support the functionality required to fulfill the request.