| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
b745a3cd6d |
Added two Extension methods "AddScopedDiscordRestClient" and "AddTransientDiscordRestClient" to allow for easier addition of scoped, and transient DiscordRestClients, it's left up to the user which one is more convenient to use for his/her application, and at the end of the day it doesn't risk running out of sockets since it uses IHttpClientFactory under the hood.
This means that it moves the useProxy boolean parameter here, not sure how much that affects the rest of the library. def an addition to consider. And something that more accustomed users/contributors will be able to answer. The main advantage of having such a method in the future could be adding resiliency. Major resiliency by for example using Polly in a simple way see: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly for example. Of course this means that the user would have to use DI (which is anyways a good practice), but I left the other default ones so that it wouldn't bring any breaking changes. |
5 years ago |