RTC Forums
November 23, 2024, 09:18:19 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest
Pages: [
1
]
« previous
next »
Print
Author
Topic: Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest (Read 4541 times)
Max Terentiev
RTC License
Posts: 49
Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest
«
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 !
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest
«
Reply #1 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
Logged
Max Terentiev
RTC License
Posts: 49
Re: Getting RtcFunctionInfo from RtcClientModule.OnBeginRequest
«
Reply #2 on:
January 30, 2017, 02:29:36 PM »
Thank you very much !
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...