Exemplo n.º 1
0
        public HttpRequest(string url, HttpAccept httpAccept = null)
        {
            UriBuilder        = new UriBuilder(url);
            Headers           = new HttpHeader();
            _segments         = new Dictionary <string, string>();
            AllowAutoRedirect = true;

            if (httpAccept != null)
            {
                Headers.Accept = httpAccept.Value;
            }
        }
Exemplo n.º 2
0
        public HttpRequest(string url, HttpAccept httpAccept = null)
        {
            UriBuilder = new UriBuilder(url);
            Headers = new HttpHeader();
            _segments = new Dictionary<string, string>();
            AllowAutoRedirect = true;
            Cookies = new Dictionary<string, string>();

            if (httpAccept != null)
            {
                Headers.Accept = httpAccept.Value;
            }
        }
Exemplo n.º 3
0
        public HttpRequest(string url, HttpAccept httpAccept = null)
        {
            Url               = new HttpUri(url);
            Headers           = new HttpHeader();
            AllowAutoRedirect = true;
            Cookies           = new Dictionary <string, string>();

            if (!RuntimeInfoBase.IsProduction)
            {
                AllowAutoRedirect = false;
            }

            if (httpAccept != null)
            {
                Headers.Accept = httpAccept.Value;
            }
        }
Exemplo n.º 4
0
        public HttpRequest(string url, HttpAccept httpAccept = null)
        {
            Url = new HttpUri(url);
            Headers = new HttpHeader();
            AllowAutoRedirect = true;
            Cookies = new Dictionary<string, string>();

            if (!RuntimeInfoBase.IsProduction)
            {
                AllowAutoRedirect = false;
            }

            if (httpAccept != null)
            {
                Headers.Accept = httpAccept.Value;
            }
        }
Exemplo n.º 5
0
        public HttpRequest(string url, HttpAccept httpAccept = null)
        {
            Method             = HttpMethod.Get;
            Url                = new HttpUri(url);
            Headers            = new HttpHeader();
            AllowAutoRedirect  = true;
            StoreRequestCookie = true;
            LogHttpError       = true;
            Cookies            = new Dictionary <string, string>();

            if (!RuntimeInfo.IsProduction)
            {
                AllowAutoRedirect = false;
            }

            if (httpAccept != null)
            {
                Headers.Accept = httpAccept.Value;
            }
        }
Exemplo n.º 6
0
        public virtual HttpRequestBuilder Accept(HttpAccept accept)
        {
            HttpAccept = accept;

            return(this);
        }
Exemplo n.º 7
0
        public virtual HttpRequestBuilder Accept(HttpAccept accept)
        {
            HttpAccept = accept;

            return this;
        }
Exemplo n.º 8
0
 public IndexerRequest(string url, HttpAccept httpAccept)
 {
     HttpRequest = new HttpRequest(url, httpAccept);
 }