protected virtual async Task ProcessRequestThen(MvxRestRequest restRequest, HttpWebRequest httpRequest) { using (var stream = await httpRequest.GetRequestStreamAsync().ConfigureAwait(false)) { restRequest.ProcessRequestStream(stream); stream.Flush(); } }
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); }