CarterCommunity / Carter

Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable.
MIT License
2.1k stars 175 forks source link

CarterModule.Get() automatically registers route for both GET and HEAD verbs #134

Closed aleksander-oven closed 5 years ago

aleksander-oven commented 5 years ago

I noticed this when trying to debug why I couldn't register a different handler for HEAD when GET was already registered for the same route. It's not something that I can't work around, of course, but I'm still wondering: is there a good reason why CarterModule.Get() would want to implicitly cover HEAD as well?

aleksander-oven commented 5 years ago

FWIW: There's no need to change anything in Carter, except for maybe the documentation. IMHO, such peculiarities deserve a mention somewhere.

jchannon commented 5 years ago

Yup good point. Feel like putting it in a PR for the README?

I copied Nancy’s implementation there. Could potentially add a flag so you can turn it off?!

On Sun, 16 Dec 2018 at 15:08, Aleksander Oven notifications@github.com wrote:

Closed #134 https://github.com/CarterCommunity/Carter/issues/134.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CarterCommunity/Carter/issues/134#event-2028897983, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGapjgDCuYb-SeNd40N2EIeR7w5yhCdks5u5mIKgaJpZM4Yx9k4 .