Skip to content

Conversation

jakejohns
Copy link
Contributor

The HTTP 405 Method Not Allowed client error response status code indicates that the server knows the request method, but the target resource doesn't support this method. The server must generate an Allow header in a 405 response with a list of methods that the target resource currently supports.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405

@oscarotero
Copy link
Member

Thanks!

I think instead of a new allow method, it's better to have a more generic headers method.

protected function allow(ResponseInterface $response, Throwable $error): ResponseInterface

The method can check if the getHeaders method exists in the $error instance and apply these headers to the response.

@filisko
Copy link
Member

filisko commented Apr 24, 2025

@jakejohns Hi, trying to close this - Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants