protected virtual void ProcessRequestThen(MvxRestRequest restRequest, HttpWebRequest httpRequest, Action continueAction) { httpRequest.BeginGetRequestStream(result => { using (var stream = httpRequest.EndGetRequestStream(result)) { restRequest.ProcessRequestStream(stream); stream.Flush(); } continueAction?.Invoke(); }, null); }
protected virtual void ProcessRequestThen( MvxRestRequest restRequest, HttpWebRequest httpRequest, Action continueAction, Action <Exception> errorAction) { httpRequest.BeginGetRequestStream(result => TryCatch(() => { using (var stream = httpRequest.EndGetRequestStream(result)) { restRequest.ProcessRequestStream(stream); stream.Flush(); } continueAction(); }, errorAction) , null); }
protected virtual void ProcessRequestThen( MvxRestRequest restRequest, HttpWebRequest httpRequest, Action continueAction, Action<Exception> errorAction) { httpRequest.BeginGetRequestStream(result => TryCatch(() => { using (var stream = httpRequest.EndGetRequestStream(result)) { restRequest.ProcessRequestStream(stream); stream.Flush(); } continueAction?.Invoke(); }, errorAction) , null); }