ktor-server-core / io.ktor.routing / PathSegmentParameterRouteSelector

PathSegmentParameterRouteSelector

data class PathSegmentParameterRouteSelector : RouteSelector

Evaluates a route against a parameter path segment and captures its value

Parameters

name - is the name of the parameter to capture values to

prefix - is an optional suffix

suffix - is an optional prefix

Constructors

<init>

PathSegmentParameterRouteSelector(name: String, prefix: String? = null, suffix: String? = null, hasTrailingSlash: Boolean)PathSegmentParameterRouteSelector(name: String, prefix: String? = null, suffix: String? = null)

Evaluates a route against a parameter path segment and captures its value

Properties

name

val name: String

is the name of the parameter to capture values to

prefix

val prefix: String?

is an optional suffix

suffix

val suffix: String?

is an optional prefix

Inherited Properties

quality

val quality: Double

indicates how good this selector is compared to siblings

Functions

evaluate

fun evaluate(context: RoutingResolveContext, segmentIndex: Int): RouteSelectorEvaluation

Evaluates this selector against context and a path segment at segmentIndex

toString

fun toString(): String