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