Unit 'HTTPRoute' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

THTTPRouter.RegisterRoute

Registers a new route with the router

Declaration

Source position: httproute.pp line 254

public function THTTPRouter.RegisterRoute(

  const APattern: string;

  AEvent: TRouteEvent;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  AMethod: TRouteMethod;

  AEvent: TRouteEvent;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  const AIntf: IRouteInterface;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  AMethod: TRouteMethod;

  const AIntf: IRouteInterface;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  const AObjectClass: TRouteObjectClass;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  AMethod: TRouteMethod;

  const AobjectClass: TRouteObjectClass;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  AData: Pointer;

  ACallBack: TRouteCallBackEx;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  AData: Pointer;

  AMethod: TRouteMethod;

  ACallBack: TRouteCallBackEx;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  ACallBack: TRouteCallBack;

  IsDefault: Boolean = False

):THTTPRoute; overload;

function THTTPRouter.RegisterRoute(

  const APattern: string;

  AMethod: TRouteMethod;

  ACallBack: TRouteCallBack;

  IsDefault: Boolean = False

):THTTPRoute; overload;

Arguments

APattern

  

URL pattern for the route

AEvent

  

Event handler for the route

IsDefault

  

Whether this is a default route

Function result

Newly registered route object

Arguments

APattern

  

URL pattern for the route

AMethod

  

HTTP method for the route

AEvent

  

Event handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AIntf

  

Interface handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AMethod

  

HTTP method for the route

AIntf

  

Interface handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AObjectClass

  

Object class handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AMethod

  

HTTP method for the route

AobjectClass

  

Object class handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AData

  

User data for extended callbacks

ACallBack

  

Callback handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AData

  

User data for extended callbacks

AMethod

  

HTTP method for the route

ACallBack

  

Callback handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

ACallBack

  

Callback handler for the route

IsDefault

  

Whether this is a default route

Arguments

APattern

  

URL pattern for the route

AMethod

  

HTTP method for the route

ACallBack

  

Callback handler for the route

IsDefault

  

Whether this is a default route

Description

RegisterRoute adds a new route to the router with the specified pattern and handler. It supports various handler types including callbacks, events, interfaces, and object classes.


Documentation generated on: Jan 27 2026