Skip to content

using IHttpClientFactory  #28

@benjohn88

Description

@benjohn88

Would love to know your thoughts on converting the TwitterClient to a Typed Clients with IHttpClientFactory.

eg:

services.AddHttpClient<TwitterClient >(client =>
{
   client.BaseAddress = new Uri(Configuration["BaseUrl"]);
})

Further more this would allow application using this library to inject the TwitterClient easily
eg In the Application that uses this library

services.AddTwitterSharp();

This could even help to add some retry policies (if you have some plans for the same) to the httpClient
Please do let me know what you think about these.
Would be more than happy to work on it and raise a PR.

Thank you so much

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions