This class is used to keep sending requests until a response code that doesn't require authentication happens or if the request requires authentication and the user has stopped trying to enter them (i.e. they hit cancel when they are prompted).
Example #1
0
        public virtual WebResponse GetResponse()
        {
            Func<WebRequest> webRequestFactory = () =>
            {
                WebRequest request = WebRequest.Create(Uri);
                InitializeRequestProperties(request);
                return request;
            };

            var requestHelper = new RequestHelper(
                webRequestFactory,
                RaiseSendingRequest,
                ProxyCache.Instance,
                CredentialStore.Instance,
                DefaultCredentialProvider,
                DisableBuffering);
            return requestHelper.GetResponse();
        }