Skip to content

Best practices on using IHttpClientFactory #48235

Answered by LeaFrock
rafalkwol asked this question in Q&A
Discussion options

You must be logged in to vote

I split my typed HttpClients for every controller

I think you misunderstand IHttpClientFactory and HttpClient. A simple answer is 'One target host, one typed HttpClient'. Since your Web-API app will be hosted as a single application with one distributed IP&Port, you just need to create one typed client with IHttpClientFactory and let it communicate with the backend.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rafalkwol
Comment options

Answer selected by rafalkwol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants