Skip to main content

Class: VersionMatcher

Selects the route that matches the version requested by an HTTP request.

Constructors​

Constructor​

new VersionMatcher(): VersionMatcher

Returns​

VersionMatcher

Methods​

match()​

match(routes, versionDefinition): RouteDefinition

Returns an exact requested-version route before the wildcard default, then the first route.

Parameters​

routes​

readonly RouteDefinition[]

versionDefinition​

VersionDefinition

Returns​

RouteDefinition