Skip to content

Consider using IHttpClientFactory instead of HttpClient #44

@vertonghenb

Description

@vertonghenb

Using a HttpClient without using static even when you're disposing the object, is considered a bad practise due to the connection that is in a n a TIME_WAIT state . Consider changing the implementation to use IHttpClientFactory as mentioned by Steve Gordon:
https://www.stevejgordon.co.uk/introduction-to-httpclientfactory-aspnetcore

private readonly HttpClient httpClient;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions