The 405 (Method Not Allowed) status code indicates that the method received in the request-line is known by the origin server but not supported by the target resource. The origin server MUST generate an Allow header field in a 405 response containing a list of the target resource’s currently supported methods.
Think about a case where the client does a POST
to /books
but that route
only supports a GET
. 405
is the expected response under that scenario.
A 405
response is cacheable by default.