TBaseHttpServerModule Class
Abstract base class for HTTP server modules: the objects that process the requests received by a server.
Remarks
A module holds a list of middlewares that intercept the processing of its requests. Descendants implement the actual request processing.
Syntax
Unit: Sparkle.HttpServer.Module
TBaseHttpServerModule = class(TInterfacedObject);
Constructors
| Name | Description |
|---|---|
| Create | Creates a new module with empty middleware lists. |
Methods
| Name | Description |
|---|---|
| AddInnerMiddleware | Adds an inner middleware to the module. Inner middlewares run after all the middlewares added with AddMiddleware, closest to the module request processing. |
| AddMiddleware | Adds a middleware to the module. Middlewares run in the order they were added, before the module request processing. |
| Execute | Processes a request: runs the middleware pipeline, then the module request processing, and closes the response if it was not closed yet. |
| ProcessRequest | Processes a request addressed to the module. Descendants implement this method. |
Properties
| Name | Description |
|---|---|
| LogEngine | Gets or sets the log engine that receives the module error messages. |