Datasnap.DSHTTPCommon.TDSRESTResultEvent
Delphi
TDSRESTResultEvent = procedure(Sender: TObject; var ResultVal: TJSONValue;
const Command: TDBXCommand;
var Handled: Boolean) of object;
C++
typedef void __fastcall (__closure *TDSRESTResultEvent)(System::TObject* Sender, System::Json::TJSONValue* &ResultVal, Data::Dbxcommon::TDBXCommand* const Command, bool &Handled);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
type typedef |
public | Datasnap.DSHTTPCommon.pas Datasnap.DSHTTPCommon.hpp |
Datasnap.DSHTTPCommon | Datasnap.DSHTTPCommon |
Description
User event for capturing and optionally modifying REST results before they are returned.
TDSRESTResultEvent is a user event for capturing and optionally modifying REST results before they are returned.
The JSON value passed in is not wrapped in a result object. If Handled
is set to False, then the caller will wrap the value of ResultVal
like this: {'result':ResultVal}
. Note also that the value passed in might (and probably will) be a JSON Array, containing one or more return values, depending on the method having been invoked. If you change the value held by ResultVal
, the new value will be returned.
Sender
is the instance that invokes the event.
ResultVal
specifies the JSON value that is returned.
Command
is the command that is executed.
Handled
is set to True if the formatting of the result is required.