protected void InterceptRequest(object request)
 {
     if (interceptor != null)
     {
         interceptor.Intercept(request);
     }
 }
Beispiel #2
0
        public IObservable <T> CreateRequestObservable <T>(RestMethodInfo methodInfo, string url, object[] arguments)
        {
            var ob = Observable.Create <T>(o =>
            {
                object request = rxHttpImpl.RxBuildRequest(o, convert, methodInfo, url);
                if (interceptor != null)
                {
                    interceptor.Intercept(request);
                }
                rxHttpImpl.RxSendRequest(o, convert, request);
                return(Disposable.Create((() => rxHttpImpl.Cancel(request))));
            });

            return(ob);
        }