Skip to content

Allow nil HTTP Server Decoders #657

@jdolce

Description

@jdolce

Currently http. NewServer() requires that you pass in a decoder otherwise it will panic in ServeHTTP(). This is slightly annoying for routes that have no input to decode. For instance GET /users, or something similar. For now I just created a common no-op decoder that I use in these cases, but it would be nice to simply pass nil.

The change is rather easy, and I am happy to provide a PR. Just wanted to make sure I wasn't missing some use case as to why it is this way first.

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