Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
npound opened this issue Aug 8, 2021 · 1 comment
Open

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

npound opened this issue Aug 8, 2021 · 1 comment

Comments

@npound
Copy link

npound commented Aug 8, 2021

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
Copy link
Author

npound commented Aug 8, 2021

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;
    }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant