예제 #1
0
        public HttpDownloader(DownloaderArgs downloaderArgs)
            : base(downloaderArgs)
        {
            var httpWebRequest = (HttpWebRequest)WebRequest;

            httpWebRequest.Headers.Add(HttpRequestHeader.AcceptLanguage, downloaderArgs.PreferredLanguages);
            httpWebRequest.UserAgent = UserAgent;
        }
예제 #2
0
 protected Downloader(DownloaderArgs downloaderArgs)
 {
     if (downloaderArgs == null)
     {
         throw new ArgumentNullException("downloaderArgs");
     }
     _mimeType          = downloaderArgs.MimeType;
     WebRequest         = WebRequest.Create(downloaderArgs.Uri);
     WebRequest.Timeout = downloaderArgs.Timeout;
 }