Sisk

Method

Router.GetRouteMethod

Namespace
Sisk.Core.Routing
Assembly
Sisk.Core.dll

GetRouteMethod(HttpMethod, RouteMethod) #

Gets the corresponding RouteMethod for a given HttpMethod, with a fallback option.

C#
public static RouteMethod GetRouteMethod(HttpMethod httpMethod, RouteMethod fallback = RouteMethod.Get)

Parameters #

httpMethod HttpMethod

The HttpMethod to convert.

fallback RouteMethod

The 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.

C#
public static RouteMethod GetRouteMethod(string httpMethod, RouteMethod fallback = RouteMethod.Get)

Parameters #

httpMethod string

The HTTP method string (e.g., “GET”, “POST”) to convert.

fallback RouteMethod

The RouteMethod to return if no direct mapping is found. Defaults to Get.

Returns #

RouteMethod

The mapped RouteMethod or the fallback value.

Type to search the documentation and the API reference.