PathMatchResult.getPathParamAs

Gets a specified path parameter's value converted to the specified type.

struct PathMatchResult
const
T
getPathParamAs
(
T
)
(
string name
,
T defaultValue = T.init
)

Parameters

name string

The name of the path parameter to get.

defaultValue T

The default value to use if no such path parameter exists.

Return Value

Type: T

The value for the path parameter.

Meta