Header menu logo Falco.UnionRoutes

Route.RouteMatcher<'TRoute> Type

A pre-compiled URL matcher that efficiently matches URL strings against route patterns. Create one with Route.createMatcher and reuse it for multiple matches.

Instance members

Instance member Description

this.Match

Full Usage: this.Match

Parameters:
    method : HttpMethod - The HTTP method of the request.
    url : string - The URL path to match (e.g., "/posts/550e8400-e29b-41d4-a716-446655440000"). Query strings are stripped.

Returns: Result<'TRoute, MatchError> Ok with the matched route value containing actual URL parameter values, or Error with details about why matching failed.

Match a URL against the route patterns. Returns the matched route value with actual parameter values parsed from the URL (e.g., the real Guid, not a default).

method : HttpMethod

The HTTP method of the request.

url : string

The URL path to match (e.g., "/posts/550e8400-e29b-41d4-a716-446655440000"). Query strings are stripped.

Returns: Result<'TRoute, MatchError>

Ok with the matched route value containing actual URL parameter values, or Error with details about why matching failed.

Type something to start searching.