public HttpWebHelper(HttpWebRequestFactoryDelegate httpWebRequestFactory)
        {
            if (httpWebRequestFactory == null)
            {
                throw new ArgumentNullException("httpWebRequestFactory");
            }

            Init();
            HttpWebRequestFactory = httpWebRequestFactory;
        }
Example #2
0
        public HttpWebHelper(HttpWebRequestFactoryDelegate httpWebRequestFactory)
        {
            if (httpWebRequestFactory == null)
            {
                throw new ArgumentNullException("httpWebRequestFactory");
            }

            Init();
            HttpWebRequestFactory = httpWebRequestFactory;
        }
        public HttpWebHelper()
        {
            Init();
            HttpWebRequestFactory =
                requestUrl =>
                {
                    if (string.IsNullOrEmpty(requestUrl))
                    {
                        throw new ArgumentException("requestUrl is null or empty", "requestUrl");
                    }

                    return new HttpWebRequestWrapper((HttpWebRequest)WebRequest.Create(requestUrl));
                };
        }
Example #4
0
        public HttpWebHelper()
        {
            Init();
            HttpWebRequestFactory =
                requestUrl =>
            {
                if (string.IsNullOrEmpty(requestUrl))
                {
                    throw new ArgumentException("requestUrl is null or empty", "requestUrl");
                }

                return(new HttpWebRequestWrapper((HttpWebRequest)WebRequest.Create(requestUrl)));
            };
        }