HttpStatusCode
is implemented as an enum
, with each possible value assigned to its corresponding HTTP status code (e.g. (int)HttpStatusCode.Ok == 200
).
However, HttpMethod
is implemented as a class
, with static properties to get instances for the various HTTP verbs (HttpMethod.Get
, HttpMethod.Put
etc). What is the rationale behind not implementing HttpMethod
as an enum
?
HttpMethod
enum in theSystem.Net.Cache
namespace. – Gardell