Method GetRouteMethod
GetRouteMethod(HttpMethod, RouteMethod)
Gets the corresponding RouteMethod for a given HttpMethod, with a fallback option.
public static RouteMethod GetRouteMethod(HttpMethod httpMethod, RouteMethod fallback = RouteMethod.Get)
Parameters
httpMethodHttpMethodThe HttpMethod to convert.
fallbackRouteMethodThe RouteMethod to return if no direct mapping is found. Defaults to Get.
Returns
- RouteMethod
The mapped RouteMethod or the fallback value.
GetRouteMethod(string, RouteMethod)
Gets the corresponding RouteMethod for a given HTTP method string, with a fallback option.
public static RouteMethod GetRouteMethod(string httpMethod, RouteMethod fallback = RouteMethod.Get)
Parameters
httpMethodstringThe HTTP method string (e.g., "GET", "POST") to convert.
fallbackRouteMethodThe RouteMethod to return if no direct mapping is found. Defaults to Get.
Returns
- RouteMethod
The mapped RouteMethod or the fallback value.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語