protected ServiceHttpClient(IdsConfig idsConfig, HttpMessageHandler handler, IHttpContextAccessor context, IDistributedCache cacheProvider, string serverScope) : base(handler) { _idsConfig = idsConfig; _cacheProvider = cacheProvider; Context = context; _serverScope = serverScope; _currentTokenCacheKey = $"access token for {_serverScope}"; }
protected ServiceHttpClient(IdsConfig idsConfig, IHttpContextAccessor context, string url, IDistributedCache cacheProvider, string serverScope) { Context = context; _cacheProvider = cacheProvider; _idsConfig = idsConfig; _serverScope = serverScope; _currentTokenCacheKey = $"access token for {_serverScope}"; BaseAddress = new Uri(url); DefaultRequestHeaders.Accept.Clear(); DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); }