getPathParamAs

Gets a specific path variable's value.

T
getPathParamAs
(
T
)
(
in ServerHttpRequest request
,
string name
,
T defaultValue = T.init
)

Parameters

request ServerHttpRequest

The request to get the path variable value from.

name string

The name of the path variable.

defaultValue T

The default value to use if no path variables are present.

Return Value

Type: T

The path variable's value.