Changing ApiKey and DataCenter does not change request URLs
See original GitHub issueI have a .NET Core application that iterates over multiple API Keys that exist in separate data centers. When switching between API keys the underlying data center component of request URLs does not change. The code does not re-use the same MailChimpManager
, an entirely new copy is instantiated for each API Key used.
Having looked at the code for BaseLogic.cs
my guess is has something to do with the use of the static IHttpClientFactory
.
Whilst I don’t pretend to fully follow the code, on line 40 the call:
client.BaseAddress = new Uri(GetBaseAddress());
Would appear to run when _httpClientFactory
is instantiated and therefore the initial values of the base URL would persist for the lifetime of the application.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Authenticate by using API keys
API-first integration to connect existing data and applications. ... Solution to bridge existing care systems and apps on Google Cloud. ... No-code development ......
Read more >Passing API key with HTTP header in cURL
When I modify my policy to look for the key in query parameter rather than the header, it works fine. Am I missing...
Read more >Configure API Key Lifetime
If you have just set a key lifetime and want to reset all API keys to adhere to the new term, you can...
Read more >Updating endpoint URLs from watsonplatform.net
Watson API endpoint URLs at watsonplatform.net are changing and will not work after they are retired. Update your calls to use the newer...
Read more >API security best practices | Google Maps Platform
Learn how to secure and manage your Google Maps Platform API keys.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same problem. Reverted to preview version 4.2.1 because of this
I upgraded today and so far so good 😉