コード例 #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
ファイル: HttpRequest.cs プロジェクト: drewfreyling/NzbDrone
        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
ファイル: HttpRequest.cs プロジェクト: whoshoe/Readarr
        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
ファイル: HttpRequestBuilder.cs プロジェクト: Macharr/Macharr
        public virtual HttpRequestBuilder Accept(HttpAccept accept)
        {
            HttpAccept = accept;

            return(this);
        }
コード例 #7
0
        public virtual HttpRequestBuilder Accept(HttpAccept accept)
        {
            HttpAccept = accept;

            return this;
        }
コード例 #8
0
ファイル: IndexerRequest.cs プロジェクト: mike-tesch/Sonarr
 public IndexerRequest(string url, HttpAccept httpAccept)
 {
     HttpRequest = new HttpRequest(url, httpAccept);
 }