Title: Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest Post by: Max Terentiev on January 30, 2017, 09:35:08 AM Hi Danijel,
I need to log remote functions calls and also perform some special things (for example exclude some remote functions from logging) depends on their names. It's possible to do it in centralized way, for example from RtcClientModule.OnBeginRequest ? Here I can get request's HTTP header but can't access body (it's json in my case). It's possible somehow ? It's will be very nice to access TRtcFunctionInfo currently processed by RtcClientModule in OnBeginRequest event. How to do it ? Thanks ! Title: Re: Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest Post by: D.Tkalcec (RTC) on January 30, 2017, 12:12:25 PM Please, download RTC SDK v7.71 (just released) and check the new "OnPrepareCall" event on the "TRtcClientModule" component. This event will be triggered after the "OnBeginRequest" event, for every remote call being prepared for sending through this component, before triggering the "PreparingCall" event on the "TRtcResult" component (assigned to the "Call" method to receive the Result from the Server).
It can be used to monitor, modify and/or skip remote calls before sending. The Sender parameter (connection component) can be used to access Session, Request or Response information, but NOT to Read the content Body or to Write the content out directly to the connection component. Data parameter will contain the remote call, Result parameter will be NIL. Set "Data.isNull:=TRUE" in this event if you want to SKIP sending this remote call. This will also SKIP triggering the "PreparingCall" event on the "TRtcResult" component. Best Regards, Danijel Tkalcec Title: Re: Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest Post by: Max Terentiev on January 30, 2017, 02:29:36 PM Thank you very much !
|