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

Use IHttpClientFactory instead of manually creating a HttpClient #2937

Merged
merged 1 commit into from
Mar 2, 2020
Merged

Use IHttpClientFactory instead of manually creating a HttpClient #2937

merged 1 commit into from
Mar 2, 2020

Conversation

NecatiMeral
Copy link
Contributor

@NecatiMeral NecatiMeral commented Feb 28, 2020

This enables customization of the created client or it's handlers from outside of this module.

IHttpClientFactory provides different endpoints to customize the created clients. One of them would be to implement a custom IHttpMessageHandlerBuilderFilter and register it in the ioc framework.

My use case is a validation of self-signed certificates that aren't known to the clients or injecting a WinHttpHandler into the httpclient automatically to be used by .net-fx projects which use the Volo.Abp.IdentityModel package.

…` instance

This enables customization of the created client or it's handlers from outside of this module.
@hikalkan hikalkan added this to the 2.2 milestone Mar 1, 2020
@hikalkan hikalkan self-requested a review March 1, 2020 10:59
@hikalkan hikalkan merged commit 1ab8a0c into abpframework:dev Mar 2, 2020
@NecatiMeral NecatiMeral deleted the identitymodel-httpclientfactory branch March 2, 2020 12:28
@maliming
Copy link
Member

maliming commented Mar 3, 2020

hi @NecatiMeral

Since there is no AddHttpClient method to register IHttpClientFactory. It will cause dependency injection problems.

And should we use named Clients?

Because the abp 2.2 version will be released soon, I temporarily reverted this. #2953

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

Successfully merging this pull request may close these issues.

3 participants