Closed epignosisx closed 5 years ago
The .NET team recommendation is that HttpClient should not be created and disposed right away, rather they should be reused:
HttpClient
https://blogs.msdn.microsoft.com/shacorn/2016/10/21/best-practices-for-using-httpclient-on-services/
Issues that could arise from the current usage:
https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
https://github.com/c0shea/Seq.Client.EventLog/blob/8ac56872a44416dadaabb399a38560497b15e0f9/src/Seq.Client.EventLog/EventLogListener.cs#L104
The .NET team recommendation is that
HttpClient
should not be created and disposed right away, rather they should be reused:https://blogs.msdn.microsoft.com/shacorn/2016/10/21/best-practices-for-using-httpclient-on-services/
Issues that could arise from the current usage:
https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
https://github.com/c0shea/Seq.Client.EventLog/blob/8ac56872a44416dadaabb399a38560497b15e0f9/src/Seq.Client.EventLog/EventLogListener.cs#L104