Exemplo n.º 1
0
 public Http()
 {
   this.RedirectBlacklist = new List<string>();
   this.Request = (HttpWebRequest) null;
   this.fCookie = string.Empty;
   this._TimeOut = 15000;
   this._Proxy = new Http.HttpProxy();
   this._UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0";
   this._Referer = string.Empty;
   this._AutoRedirect = true;
   this._StoreCookies = true;
   this._SendCookies = true;
   this._GetImage = false;
   this._LastRequestUri = string.Empty;
   this._LastResponseUri = string.Empty;
   this._KeepAlive = true;
   this._Version = HttpVersion.Version11;
   this._Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
   this._AllowExpect100 = false;
   this._ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
   this._DebugMode = false;
   this._AcceptEncoding = "gzip, deflate";
   this._AcceptLanguage = "en-us,en;q=0.5";
   this._AcceptCharset = "ISO-8859-1,utf-8;q=0.7,*;q=0.7";
   this._ForceHttps = false;
   ServicePointManager.DefaultConnectionLimit = 500;
   ServicePointManager.Expect100Continue = this.AllowExpect100;
   ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(this.AcceptAllCertifications);
   ServicePointManager.UseNagleAlgorithm = false;
   ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
   this.Cookies = new List<Http.HttpCookie>();
 }
Exemplo n.º 2
0
 public HttpProxy(string pServer, int pPort, string pUserName = "", string pPassword = "")
 {
   this = new Http.HttpProxy();
   this.Server = pServer;
   this.Port = pPort;
   this.UserName = pUserName;
   this.Password = pPassword;
 }