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
The EnsureSuccessStatusCode method throws an exception if the HTTP response was unsuccessful. In .NET Framework and .NET Core 2.2 and earlier versions, if the Content is not null, this method will also call Dispose to free managed and unmanaged resources. Starting with .NET Core 3.0, the content will not be disposed.
Analyzer have potential to be very useful for handling things like this.
The text was updated successfully, but these errors were encountered:
Of course EnsureSuccessStatusCode above would need more handling and tests but it is pretty straightforward. The problem for me is what types to add support for and how.
My thinking is it is good if we support common types in the framework and open source nugets.
I don't write much web so need help here. Stumbled on this https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage.ensuresuccessstatuscode?view=netcore-3.1#remarks
Analyzer have potential to be very useful for handling things like this.
The text was updated successfully, but these errors were encountered: