|
@@ -1,6 +1,7 @@
|
|
unit webjsonrpc;
|
|
unit webjsonrpc;
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$mode objfpc}{$H+}
|
|
|
|
+{$define debugjsonrpc}
|
|
|
|
|
|
interface
|
|
interface
|
|
|
|
|
|
@@ -98,6 +99,11 @@ Type
|
|
end;
|
|
end;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
+
|
|
|
|
+{$ifdef debugjsonrpc}
|
|
|
|
+uses dbugintf;
|
|
|
|
+{$endif}
|
|
|
|
+
|
|
{ TCustomJSONRPCContentProducer }
|
|
{ TCustomJSONRPCContentProducer }
|
|
|
|
|
|
function TCustomJSONRPCContentProducer.GetIDProperty: String;
|
|
function TCustomJSONRPCContentProducer.GetIDProperty: String;
|
|
@@ -278,6 +284,7 @@ begin
|
|
Req:=P.Parse;
|
|
Req:=P.Parse;
|
|
C:=CreateContext;
|
|
C:=CreateContext;
|
|
try
|
|
try
|
|
|
|
+ {$ifdef debugjsonrpc}SendDebugFmt('Dispatching request : "%s"',[Req.AsJSON]);{$endif}
|
|
Result:=ADispatcher.Execute(Req,C);
|
|
Result:=ADispatcher.Execute(Req,C);
|
|
finally
|
|
finally
|
|
C.Free;
|
|
C.Free;
|