Web.HTTPApp.TCustomWebDispatcher.DoBeforeDispatch

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DoBeforeDispatch(Request: TWebRequest; Response: TWebResponse): Boolean;

C++

bool __fastcall DoBeforeDispatch(TWebRequest* Request, TWebResponse* Response);

Properties

Type Visibility Source Unit Parent
function protected
Web.HTTPApp.pas
Web.HTTPApp.hpp
Web.HTTPApp TCustomWebDispatcher

Description

Generates a BeforeDispatch event and returns a value that indicates whether the dispatcher should look for action items to handle the request.

Applications cannot call DoBeforeDispatch. The DispatchAction method calls DoBeforeDispatch before trying to match the HTTP request message with any of its action items.

If the BeforeDispatch event handler indicates that it has handled the request message, DoBeforeDispatch returns true, and the DispatchAction method does not try to pass the request message to any of the action items. Otherwise, DoBeforeDispatch returns false, and unless the response message was sent from within the BeforeDispatch event handler, the DispatchAction method proceeds with looking for action items to handle the request message.

If DoBeforeDispatch returns true but the response has not been sent, DispatchAction generates an AfterDispatch event.

See Also