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.
Currently
http. NewServer()requires that you pass in a decoder otherwise it will panic inServeHTTP(). 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 passnil.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.