Sobes.tech
Junior — Middle

What does HTTP response code 405 mean and in what cases is it displayed?

sobes.tech AI

Answer from AI

HTTP response code 405 means "Method Not Allowed". It is returned by the server when the client attempts to perform an HTTP request with a method that is not supported for the given resource. For example, if the server expects a GET request, but receives a POST, it may respond with 405.

Example: if you have an API that only allows data retrieval via GET, and the client sends a POST, the server will return 405 with an Allow header listing the permitted methods.