Last active
May 19, 2021 16:49
-
-
Save TechWatching/a907d4bcc06fa98a60f2939a6a388ec6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollectionservices) | |
{ | |
services.AddMemoryCache(); | |
services.AddHttpClient<IUserApiAuthenticationService, UserApiAuthenticationService>() | |
.ConfigureHttpClient(c => c.BaseAddress ="http://urltotheuserapi.com"); | |
services.AddTransient<UserApiAuthenticationHandler>(); | |
services.AddHttpClient<UserService, UserService>() | |
.ConfigureHttpClient(c => c.BaseAddress ="http://urltotheuserapi.com") | |
.AddHttpMessageHandler<UserApiAuthenticationHanler>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment