public HttpResponseEventArgs(string method, Uri url, string[] responseHeader, CookieList cookies)
 {
     this.method         = method;
     this.url            = url;
     this.responseHeader = responseHeader;
     this.cookies        = cookies;
 }
Exemplo n.º 2
0
        private void ReadCookies(StringCollectionEx responseHeader)
        {
            var cookies = new CookieList();

            if (AllowCookies)
            {
                cookies.GetResponseCookies(responseHeader);
            }
            OnResponseReceived(new HttpResponseEventArgs(method, Url.Url, responseHeader.ToArray(), cookies));
        }
Exemplo n.º 3
0
 public Http()
 {
     responseHeader     = new HttpResponseHeader();
     cookies            = new CookieList();
     proxySettings      = new HttpProxySettings();
     url                = new UrlParser();
     httpVersion        = HttpVersion.Http1_1;
     authenticationType = AuthenticationType.AutoDetect;
     userAgent          = "Mozilla/4.0 (compatible; Clever Internet Suite 6.1)";
     keepConnection     = true;
     allowCaching       = true;
     allowRedirects     = true;
     allowCookies       = true;
     allowCompression   = true;
     maxRedirects       = 15;
     maxAuthRetries     = 4;
     userName           = string.Empty;
     password           = string.Empty;
 }