Пример #1
0
        public HttpClient(IEnumerable <IHttpRequestInterceptor> requestInterceptors, ICacheManager cacheManager, IRateLimitService rateLimitService, IHttpDispatcher httpDispatcher, Logger logger)
        {
            _requestInterceptors = requestInterceptors.ToList();
            _rateLimitService    = rateLimitService;
            _httpDispatcher      = httpDispatcher;
            _logger = logger;

            ServicePointManager.DefaultConnectionLimit = 12;
            _cookieContainerCache = cacheManager.GetCache <CookieContainer>(typeof(HttpClient));
        }
Пример #2
0
 public IndexerHttpClient(IIndexerProxyFactory indexerProxyFactory,
                          IEnumerable <IHttpRequestInterceptor> requestInterceptors,
                          ICacheManager cacheManager,
                          IRateLimitService rateLimitService,
                          IHttpDispatcher httpDispatcher,
                          Logger logger)
     : base(requestInterceptors, cacheManager, rateLimitService, httpDispatcher, logger)
 {
     _indexerProxyFactory = indexerProxyFactory;
 }
Пример #3
0
 public HttpClient(IEnumerable <IHttpRequestInterceptor> requestInterceptors, ICacheManager cacheManager, IRateLimitService rateLimitService, Logger logger)
     : this(requestInterceptors, cacheManager, rateLimitService, null, logger)
 {
     _httpDispatcher = new FallbackHttpDispatcher(cacheManager.GetCache <bool>(typeof(HttpClient), "curlTLSFallback"), _logger);
 }