Skip to content

THTTPRoute

Base HTTP route class

Declaration

Source position: httproute.pp line 52

type

  THTTPRoute = class(TCollectionItem)
  public
    destructor Destroy;
    class function NormalizeRoute : string;
    procedure HandleRequest;
    function Matches : Boolean;
    function MatchPattern : Boolean;
    function MatchMethod : Boolean;
  published
    property Default: Boolean; {rw}
    property URLPattern: string; {rw}
    property Method: TRouteMethod; {rw}
  end;

Description

THTTPRoute is the base class for all HTTP routes in the routing system. It provides pattern matching functionality and request handling infrastructure for specific route implementations.

Properties

Member Visibility Description
Default published Indicates if this is a default route
Method published HTTP method handled by this route
URLPattern published URL pattern for route matching
See all Properties

Methods

Member Visibility Description
Destroy public Destroys the HTTP route instance
HandleRequest public Handles an HTTP request
Matches public Checks if route matches pattern and method
MatchMethod public Checks if route matches HTTP method
MatchPattern public Matches URL pattern against request path
NormalizeRoute public Normalizes a route pattern string
See all Methods

See also

Name Description
THTTPRouter HTTP request router class
TRouteMethod HTTP method enumeration for routing
TRouteOptions Set of route matching options