Why HttpRequest.HttpMethod is string instead of Enum?

后端 未结 4 1920
没有蜡笔的小新
没有蜡笔的小新 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条回答
  •  Happy的楠姐
    2020-12-17 09:18

    The spec explicitly allows for more methods to be used, and so the set of all methods cannot be enumerated.

提交回复
热议问题