Consider making verbs in `HttpMethods` as `const string` rather than `static readonly string`
kchanlee opened this issue · 2 comments
kchanlee commented
When I am trying to use AcceptVerbsAttribute, I don't want to write verbs literally (e.g. [AcceptVerbs("GET", "POST")]) so I try to reuse the verbs defined in HttpMethods (e.g. [AcceptVerbs(HttpMethods.Get, HttpMethods.Post)]). But this is not acceptable by compiler.
How about making verbs in HttpMethods as const string rather than static readonly string so that they can be more widely used?
khellang commented
This has been discussed before; #712 (comment), but I think @davidfowl felt strongly that they should be static readonly for some reason.