예제 #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;
            }
        }
예제 #2
0
파일: HttpRequest.cs 프로젝트: nnic/Sonarr
        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;
            }
        }
예제 #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;
            }
        }
예제 #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;
            }
        }
예제 #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;
            }
        }
예제 #6
0
        public virtual HttpRequestBuilder Accept(HttpAccept accept)
        {
            HttpAccept = accept;

            return(this);
        }
예제 #7
0
        public virtual HttpRequestBuilder Accept(HttpAccept accept)
        {
            HttpAccept = accept;

            return this;
        }
예제 #8
0
 public IndexerRequest(string url, HttpAccept httpAccept)
 {
     HttpRequest = new HttpRequest(url, httpAccept);
 }