I heed to his a callback method after all REST call. I have already found a method to call before REST call, but after eludes me. Here's the code:
Class Test.REST Extends %CSP.REST
{
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/:classname" Method="GET" Call="TEST" Cors="true"/>
</Routes>
}
/// This method Gets called prior to dispatch of the request. Put any common code here
/// that you want to be executed for EVERY request. If pContinue is set to 0, the
/// request will NOT be dispatched according to the UrlMap.



