private IHttpClient GetHttpClient(string cacheKey, IHttpClientBuilder builder, bool useCookieContainer, bool allowAutoRedirect) { var httpClient = _cacheHandlers.Get(cacheKey); if (httpClient == null) { httpClient = builder.Create(useCookieContainer, allowAutoRedirect); } return(httpClient); }
private IHttpClient GetHttpClient(string cacheKey, IHttpClientBuilder builder) { var httpClient = _cacheHandlers.Get(cacheKey); if (httpClient == null) { httpClient = builder.Create(); } return(httpClient); }
private IHttpClient GetHttpClient(string cacheKey, IHttpClientBuilder builder, DownstreamContext request) { var httpClient = _cacheHandlers.Get(cacheKey); if (httpClient == null) { httpClient = builder.Create(request.DownstreamReRoute); } return(httpClient); }
public async Task GetAsync( IRequestInfo info, CancellationToken cancellationToken = default) { using var client = httpClientBuilder.Create(info); var linkedToken = cancellationTokenFactory.Create(cancellationToken, info.Timeout); var response = await client.GetAsync(info.Url, linkedToken); response.EnsureSuccessStatusCode(); }