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
/books but that route
only supports a
405 is the expected response under that scenario.
405 response is cacheable by default.