Skip to content

Commit f07a3b5

Browse files
committed
Update HttpResponseMessage.EnsureSuccessStatusCode method
Starting with .NET Core 3.0, the EnsureSuccessStateCode method no longer disposes the HttpResponseMessage.Content object. Reference: dotnet/corefx#29795 (comment)
1 parent d152a44 commit f07a3b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Net.Http/HttpResponseMessage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
<format type="text/markdown"><![CDATA[
262262
263263
## Remarks
264-
The <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A> method throws an exception if the HTTP response was unsuccessful. If the <xref:System.Net.Http.HttpResponseMessage.Content%2A> is not `null`, this method will also call <xref:System.Net.Http.HttpResponseMessage.Dispose%2A> to free managed and unmanaged resources.
264+
The <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A> method throws an exception if the HTTP response was unsuccessful. In .NET Framework and .NET Core (.NET Core prior to version 3.0), if the <xref:System.Net.Http.HttpResponseMessage.Content%2A> is not `null`, this method will also call <xref:System.Net.Http.HttpResponseMessage.Dispose%2A> to free managed and unmanaged resources. Starting with .NET Core 3.0, the content will not be disposed.
265265
266266
]]></format>
267267
</remarks>

0 commit comments

Comments
 (0)