Table of Contents

THttpDispatcher.DispatchRequest Method

Processes an incoming request: routes it to the module matching its URI and makes sure a response is always sent.

Remarks

This method is called by HTTP server implementations for each received request. When no module matches the request URI, a 404 response is sent. When an unhandled exception escapes the module, it is logged to the LogEngine and a 500 response is sent.

Syntax

Unit: Sparkle.HttpServer.Dispatcher

procedure THttpDispatcher.DispatchRequest(Context: THttpServerContext);

Parameters

<-> Parameter Type Description
Context THttpServerContext The server context holding the request to process and the response to fill.

See also