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

using IHttpClientFactory #28

Open
benjohn88 opened this issue Apr 8, 2022 · 4 comments
Open

using IHttpClientFactory #28

benjohn88 opened this issue Apr 8, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@benjohn88
Copy link
Contributor

benjohn88 commented Apr 8, 2022

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

@Xwilarg
Copy link
Owner

Xwilarg commented Apr 8, 2022

I don't know much about services but that sounds like a nice idea, might want to also keep the old way as well tho

@Xwilarg Xwilarg added the enhancement New feature or request label Apr 8, 2022
@benjohn88
Copy link
Contributor Author

@Xwilarg Awesome, would work on it then and would raise a PR for the same. Thank you

@benjohn88
Copy link
Contributor Author

Sorry for the delay. Was busy with work .
is this still up for grabs? Thanks

@Xwilarg
Copy link
Owner

Xwilarg commented Aug 13, 2023

I'll need to speak with @marcogruhl because we don't really have an effective way to test PRs rn but yeah I think it's still free

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

No branches or pull requests

2 participants