dougdellolio / coinbasepro-csharp

The unofficial .NET/C# client library for the Coinbase Pro/GDAX API
MIT License
193 stars 90 forks source link

Enable HTTP Service to be treated as an HTTP Service in DI. #294

Open npound opened 2 years ago

npound commented 2 years ago

Have the HttpService that CoinbaseClient consumes follow HTTPClient standards to enable HTTP retry and DI handling.

https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#how-to-use-typed-clients-with-ihttpclientfactory

npound commented 2 years ago

Looking for something like this ` private readonly System.Net.Http.HttpClient Client;

    public HttpClient() : this(new System.Net.Http.HttpClient())
    {
    }

    public HttpClient(System.Net.Http.HttpClient httpClient)
    {
        Client = httpClient;
    }`