Use IHttpClientFactory if available in hosting packages#128
Use IHttpClientFactory if available in hosting packages#128
IHttpClientFactory if available in hosting packages#128Conversation
|
The documentation preview is available at https://preview.netcord.dev/128. |
IHttpClientFactory is available in hosting packagesIHttpClientFactory if available in hosting packages
| .ConfigureCommands(o => o.Prefix = ">") | ||
| .ConfigureApplicationCommands<ApplicationCommandInteraction, ApplicationCommandContext, AutocompleteInteractionContext>(o => o.DefaultParameterDescriptionFormat = "AA") | ||
| .ConfigureApplicationCommands(o => o.DefaultParameterDescriptionFormat = "XD") | ||
| .AddDiscordGateway(o => o.Intents = GatewayIntents.All) |
There was a problem hiding this comment.
If only .ConfigureDiscordGateway() could be merged into this call, and then have .AddDiscordGateway() internally call .AddHttpClient() for the user (and document it with the xml doc on the method).
There was a problem hiding this comment.
.ConfigureDiscordGateway call can be removed here. It is here for testing purposes.
Also the whole idea behind this feature is it not being default, as it would require a Microsoft.Extensions.Http dependency.
This feature has been dismissed for a long time because I don't really like the idea of searching the provider type by an assembly qualified type name. I also think this is too implicit. Well, I am just not a fan of this implementation I think.
No description provided.