Skip to content

Reference for unit 'HTTPRoute'

HTTP request routing implementation

uses

Used units Description
System
Classes
sysutils
SyncObjs Synchronization objects.
HTTPDefs Basic HTTP protocol declarations and classes

Overview

The HttpRoute unit provides HTTP request routing functionality for web applications. It defines the THTTPRouter class, which allows mapping URL patterns to specific handlers based on HTTP methods and path patterns, with support for callbacks, events, objects, and interfaces as route handlers.

A global instance of the router is available in HTTPRouter, this is where you must register your routes: the rest of the FPC web framework uses this global instance to determine where to route requests to.

Topic Description
HttpRouterAdvancedHandlers Advanced HTTP Router Handler Examples
HttpRouterMethods HTTP Router Methods and RESTful APIs
HttpRouterInterceptors HTTP Router Interceptors and Middleware
HttpRouterParameters HTTP Router Parameterized Routes
HttpRouterBasicUsage Basic HTTP Router Usage
HttpRouterHandlerTypes HTTP Router Handler Types
HttpRouterPrinciple HTTP Router Working Principle