The resource exists but does not support the HTTP method used.
405 Method Not Allowed says the target resource is known but rejects this method, for example a DELETE on a read-only resource or a POST to a static file. The server must include an Allow header listing the methods it does support. 405 is heuristically cacheable.
Allow: GET, HEAD.| Header | Role |
|---|---|
Allow | Required: methods the resource supports. |
HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
{"error": "Method POST not allowed"}