Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve method not allowed handling #301

Open
sharpner opened this issue Oct 26, 2017 · 0 comments
Open

Improve method not allowed handling #301

sharpner opened this issue Oct 26, 2017 · 0 comments

Comments

@sharpner
Copy link
Member

sharpner commented Oct 26, 2017

We currently have a private methodNotAllowed handler that gets registered only in the case that a user uses the default httprouter.

We should somehow make sure that one gets registered.
Additionally, it currently has an unnecessary dependency on the whole API object just to set the response Content-Type header. We either have to make sure that one API object always has one Content-Type set for all method not allowed, or that the method not allowed header can understand which Content-Type is relevant for each call.

Maybe we can now even auto plug the router for each framework, since because of the build tag, we now which framework is getting used....

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

No branches or pull requests

1 participant