public HttpClientWrapper( HttpClient httpClient, Uri host, HttpClientSettings httpClientSettings) : base(typeof(T), httpClient, host, httpClientSettings) { }
public virtual HttpMessageInvoker GetClient(HttpClientSettings clientSetting, params DelegatingHandler[] handlers) { HttpClient httpClient = null; if (clientSetting.AutomaticDecompression) { var internalHandler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate }; httpClient = HttpClientFactory.Create(internalHandler, handlers); } else { httpClient = HttpClientFactory.Create(handlers); } httpClient.Timeout = clientSetting.Timeout; return(httpClient); }
public HttpClientWrapperFactory() { HttpClientSettings = new HttpClientSettings(); HttpClientProvider = new DefaultHttpClientProvider(); }
public EasyClientConfig() { HttpClientSettings = new HttpClientSettings(); HttpClientProvider = new DefaultHttpClientProvider(); }