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.

why HttpMethods are not constants? #868

Description

@Bartmax

I was trying to use HttpMethods as parameters for an Attribute and found out those are not constants but readonly. why aren't const?

public static readonly string Connect = "CONNECT";
public static readonly string Delete = "DELETE";
public static readonly string Get = "GET";
public static readonly string Head = "HEAD";
public static readonly string Options = "OPTIONS";
public static readonly string Patch = "PATCH";
public static readonly string Post = "POST";
public static readonly string Put = "PUT";
public static readonly string Trace = "TRACE";

https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNetCore.Http.Abstractions/HttpMethods.cs#L10-L18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions