Skip to content

Improve method not allowed handling #301

Open
@sharpner

Description

@sharpner

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....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions