Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Consider making verbs in HttpMethods as const string rather than static readonly string #795

Closed
@kchanlee

Description

@kchanlee

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions