Created
December 14, 2019 21:59
-
-
Save PadreSVK/9861931f3c9ab29105b6aea1b487efc9 to your computer and use it in GitHub Desktop.
Registrácia HTTP clienta
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
services.AddHttpClient<IOpenWeatherClient, OpenWeatherClient>(s => | |
{ | |
var options = new OpenWeatherHttpClientOptions(); | |
Configuration.GetSection("OpenWeatherHttpClientOptions").Bind(options); | |
s.BaseAddress = new Uri(options.Url); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment