You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've also come across the fact that this particular client doesn't offer any way to either 1) configure a custom HttpClient by way of options or the like, or 2) implement the IDisposable interface such that the constructed HttpClient is properly disposed of (ideally, the client would implement both in my opinion).
We're in a position of always wanting to address all possible leakages due to the "native application" running as a form of long-run background service, so I disagree with the previous stance that it shouldn't really ever affect native applications (what constitutes a "native application" is starting to blur thanks to Blazor, MAUI and etc).
thanks for researching this. There is a long, long discussion on how to use HttpClient that spans multiple years now.
I can assure you, that the above potential problems are not real problems for native GUIs (and that's what this library is targeting).
Yes, technically the number of times it is ever invoked should be relatively small but again with a background long-running service, we'd like to always address a potential leakage.
That said, being that the previous issue went stale would it just be a matter of proposing improvements to allow for providing a client and implementing IDisposable?
We've also run into this issue when we tried to use the DLL inside Unity WebGL app. HttpClient from System.Net namespace does not work in Unity WebGL and it is necessary to use UnityWebRequest instead. Having an interface which we could implement using any HTTP client (UnityWebRequest in this case) would have been nice. In UWP, it might be also desirable to use Windows.Web.HttpClient which has more features than the System.Net.HttpClient.
I've also come across the fact that this particular client doesn't offer any way to either 1) configure a custom HttpClient by way of options or the like, or 2) implement the IDisposable interface such that the constructed HttpClient is properly disposed of (ideally, the client would implement both in my opinion).
We're in a position of always wanting to address all possible leakages due to the "native application" running as a form of long-run background service, so I disagree with the previous stance that it shouldn't really ever affect native applications (what constitutes a "native application" is starting to blur thanks to Blazor, MAUI and etc).
#212
Yes, technically the number of times it is ever invoked should be relatively small but again with a background long-running service, we'd like to always address a potential leakage.
That said, being that the previous issue went stale would it just be a matter of proposing improvements to allow for providing a client and implementing IDisposable?
@CarlG12
The text was updated successfully, but these errors were encountered: