Пример #1
0
        internal void LoadSheet()
        {
            //WebRequest request = (WebRequest)WebRequest.Create(AbsoluteHref);
            WebRequest request = new ExtendedHttpWebRequest(AbsoluteHref);
            TriedDownload = true;
            try
            {
                WebResponse response = (WebResponse)request.GetResponse();

                SucceededDownload = true;
                System.IO.StreamReader str = new StreamReader(response.GetResponseStream(), System.Text.Encoding.Default, true);
                sheetContent = str.ReadToEnd();
                str.Close();
            }
            catch
            {
                SucceededDownload = false;
                sheetContent = String.Empty;
            }
        }
Пример #2
0
        public WebResponse GetResource(Uri absoluteUri)
        {
            //WebRequest request = WebRequest.Create(absoluteUri);
            WebRequest request = new ExtendedHttpWebRequest(absoluteUri);
            WebResponse response = request.GetResponse();

            return response;
        }