Sign in Join
FPDoc Onlineexperiment

THTTPRouter.FindHTTPRoute function

Member of THTTPRouterpublicIn unit HTTPRoute

Finds a route matching path and method

Declaration

pascal
function FindHTTPRoute(const Path: string; AMethod: TRouteMethod; 
 Params: TStrings; out MethodMismatch: Boolean)
: THTTPRoute

Arguments

Path

Request path to match

AMethod

HTTP method to match

Params

String list to store extracted parameters

MethodMismatch

Returns True if pattern matched but method didn't

Function result

Matching route or nil if not found

Description

FindHTTPRoute searches for a route that matches the specified path and HTTP method. It extracts parameters and provides information about method mismatches.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.