TMS Web - DataSnap Rest App

Have DataSanp Rest Application and would like to use the generate exposed functions within a TMS Web application. Any demos or documentation on how to setup TMS Web buttons to call these functions, as well as pass responses from the DS Rest App back to TMS Web functions?

Referring to TMSWeb Core, I did find the Application.RunScript(AScript: string), however there doesn't appear to be any examples on it. I am assuming that I pass the javascript function as the AScript with any params needed and it would be called normally. Application.RunScript('onReverseStringClick();'); which would be similar to a onClick="onReverseStringClick();" in my HTML docs? 

I would also have to add the serverfunctions*.js files etc to the project so they would be included in the built page?  (I have not had a chance to download and try yet)

Got it working with TWebClientConnection connection to the rest URI and parsing the data.

The TWebHttpRequest does not work, as it "always" wants to send an "OPTIONS" request before doing anything which throws a 500 error on the DS Rest App. Same things happens with the TWebRESTClient. Regardless of the fact I specify httpGET or httpPOST, it always sends an "OPTIONS" request first which makes both of these components almost useless for me at this point.

The TWebClientConnection though, works rather well. I do have to parse the inital result and change the AResponse to the value of the result, but so long as I have the fields defined in the dataset, it works!