405 Method Not Allowed
4xx Client Error

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.

RFC 7231 6.5.5

Notes

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.

Caching

A 405 response is cacheable by default.

Links