Why HttpRequest.HttpMethod is string instead of Enum?

后端 未结 4 1925
没有蜡笔的小新
没有蜡笔的小新 2020-12-17 08:36

In the Reference of HttpRequest.HttpMethod of .NET Framework, request type is declared with System.String type.

In RFC 2616 all HTTP request methods are

4条回答
  •  别那么骄傲
    2020-12-17 09:13

    if HTTP Comes with a new method, then java and C# needs to update their enum. When will they update it? Will they release a patch? or will be updated in next version? So defining a enum on values which they dont control is not a wise decision.

提交回复
热议问题