Noob question:

Noob question:

Is there a cleaner way to insert a JsonRPC request handler into a TWebModule?

Note – Insert as an action in code, and not at design time.

procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);


if (Request.MethodType = mtPost) and (Request.ContentType = ‘application/json’) and (Request.PathInfo = ‘/’)

then begin

JsonRPC.Invoke(Sender, Request, Response, Handled);


else begin

Response.Content := {“”,””}

” +

‘Nothing to see’ +

‘Move along’ +




3 thoughts on “Noob question:

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.