Sign in Join
FPDoc Onlineexperiment

THTTPRouter class

In unit HTTPRoute

HTTP request router class

Declaration

pascal
THTTPRouter = class(TComponent)

Inheritance

  1. THTTPRouter
  2. TComponent
  3. TPersistent
  4. TObject

Description

THTTPRouter provides HTTP request routing functionality for web applications. It manages a collection of routes and matches incoming HTTP requests to appropriate handlers based on URL patterns and HTTP methods.

Properties

RoutespublicProvides indexed access to routes
RouteCountpublicReturns the number of registered routes
BeforeRequestpublicEvent triggered before processing requests
AfterRequestpublicEvent triggered after processing requests
RouteOptionspublicGlobal options for route matching

Methods

Lockprotected
Unlockprotected
CreateHTTPRouteprotected
CreateRouteListprotected
CreateInterceptorListprotected
CheckDuplicateprotected
DoRouteRequestprotected
GetRequestPathprotected
CreatepublicCreates a new HTTP router instance
DestroypublicDestroys the HTTP router instance
FindDefaultRoutepublicFinds the default route for a method
DeleteRoutepublicRemoves a route from the collection
DeleteRouteByIDpublicRemoves a route by its ID
SanitizeRoutepublicSanitizes a route path string
ServicepublicReturns the global router service instance
ServiceClasspublicReturns the router service class
SetServiceClasspublicSets the router service class
StringToRouteMethodpublicConverts string to route method enumeration
RegisterInterceptorpublicRegisters a request interceptor
UnRegisterInterceptorpublicRemoves a request interceptor
RegisterRoutepublicRegisters a new route with the router
FindHTTPRoutepublicFinds a route matching path and method
GetHTTPRoutepublicGets the best matching route for path and method
RouteRequestpublicRoutes an HTTP request to appropriate handler
MoveRouteBeforeDefaultpublicMoves route before default routes
MoveRouteBeforepublicMoves one route before another

Inherited

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

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