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
Copy file name to clipboardExpand all lines: xml/System.Net.Http/HttpClient.xml
+7-7
Original file line number
Diff line number
Diff line change
@@ -600,11 +600,11 @@ The <paramref name="requestUri" /> is not an absolute URI.
600
600
-or-
601
601
602
602
<seecref="P:System.Net.Http.HttpClient.BaseAddress" /> is not set.</exception>
603
-
<exceptioncref="T:System.Net.Http.HttpRequestException">The request failed due to an issue getting a valid HTTP response such as network connectivity failure, DNS failure, server certificate validation error or invalid server response. On .NET 8+ the reason is indicated by <seecref="P:System.Net.Http.HttpRequestException.HttpRequestError" />
603
+
<exceptioncref="T:System.Net.Http.HttpRequestException">The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8 and later versions, the reason is indicated by <seecref="P:System.Net.Http.HttpRequestException.HttpRequestError" />.
604
604
605
605
-or-
606
606
607
-
.NET Framework only: the request timed out.</exception>
607
+
.NET Framework only: The request timed out.</exception>
608
608
<exceptioncref="T:System.OperationCanceledException">.NET Core and .NET 5 and later only: The request failed due to timeout.</exception>
609
609
</Docs>
610
610
</Member>
@@ -1681,15 +1681,15 @@ the respose status code was outside of the range of 200-299 (status codes indica
1681
1681
]]></format>
1682
1682
</remarks>
1683
1683
<exceptioncref="T:System.InvalidOperationException">The <paramrefname="requestUri" /> must be an absolute URI or <seecref="P:System.Net.Http.HttpClient.BaseAddress" /> must be set.</exception>
1684
-
<exceptioncref="T:System.Net.Http.HttpRequestException">The request failed due to an issue getting a valid HTTP response such as network connectivity failure, DNS failure, server certificate validation error or invalid server response. On .NET 8+ the reason is indicated by <seecref="P:System.Net.Http.HttpRequestException.HttpRequestError" />
1684
+
<exceptioncref="T:System.Net.Http.HttpRequestException">The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8+, the reason is indicated by <seecref="P:System.Net.Http.HttpRequestException.HttpRequestError" />.
1685
1685
1686
1686
-or-
1687
1687
1688
-
the respose status code was outside of the range of 200-299 (status codes indicating success according to the standard)
1688
+
The response status code was outside of the range of 200-299 (which indicate success according to the standard).
1689
1689
1690
1690
-or-
1691
1691
1692
-
.NET Framework only: the request timed out.</exception>
1692
+
.NET Framework only: The request timed out.</exception>
1693
1693
<exceptioncref="T:System.OperationCanceledException">.NET Core and .NET 5 and later only: The request failed due to timeout.</exception>
1694
1694
</Docs>
1695
1695
</Member>
@@ -2573,8 +2573,8 @@ The size specified is greater than the maximum allowed buffer size.</exception>
2573
2573
2574
2574
]]></format>
2575
2575
</remarks>
2576
-
<exceptioncref="T:System.InvalidOperationException">The <paramrefname="requestUri" /> must be an absolute URI or <seecref="P:System.Net.Http.HttpClient.BaseAddress" /> must be set.</exception>
2577
-
<exceptioncref="T:System.Net.Http.HttpRequestException">The request failed due to an issue getting a valid HTTP response such as network connectivity failure, DNS failure, server certificate validation error or invalid server response. On .NET 8+ the reason is indicated by <seecref="P:System.Net.Http.HttpRequestException.HttpRequestError" /></exception>
2576
+
<exceptioncref="T:System.InvalidOperationException">The <paramrefname="requestUri" /> is not an absolute URI and <seecref="P:System.Net.Http.HttpClient.BaseAddress" /> isn't set.</exception>
2577
+
<exceptioncref="T:System.Net.Http.HttpRequestException">The request failed due to an issue getting a valid HTTP response, such as network connectivity failure, DNS failure, server certificate validation error, or invalid server response. On .NET 8+, the reason is indicated by <seecref="P:System.Net.Http.HttpRequestException.HttpRequestError" />.</exception>
2578
2578
<exceptioncref="T:System.OperationCanceledException">The request failed due to timeout.</exception>
2579
2579
<exceptioncref="T:System.UriFormatException">The provided request URI is not valid relative or absolute URI.</exception>
Copy file name to clipboardExpand all lines: xml/System.Net.Http/HttpResponseMessage.xml
+3-3
Original file line number
Diff line number
Diff line change
@@ -351,9 +351,9 @@ When the `disposing` parameter is `true`, this method releases all resources hel
351
351
<formattype="text/markdown"><![CDATA[
352
352
353
353
## Remarks
354
-
The <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A> method throws an <xref:System.Net.Http.HttpRequestException> if <xref:System.Net.Http.HttpResponseMessage.StatusCode> is outside of the range the range 200-299 (the range of status codes indicating success according to the standard).
355
-
In some scenarios you may need stronger control defining which status codes are considered to be succesful; for example an API may be expected to always return `200 OK`. In such cases we recommend to manually check if <xref:System.Net.Http.HttpResponseMessage.StatusCode> matches the expected value(s).
356
-
In .NET Framework and .NET Core 2.2 and earlier versions, 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.
354
+
The <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A> method throws an <xref:System.Net.Http.HttpRequestException> if <xref:System.Net.Http.HttpResponseMessage.StatusCode> is outside of the range 200-299 (the range of status codes indicating success according to the standard).
355
+
In some scenarios, you might need more control over which status codes are considered to be successful; for example, an API might be expected to always return `200 OK`. In such cases, we recommend to manually check if <xref:System.Net.Http.HttpResponseMessage.StatusCode> matches the expected value.
356
+
In .NET Framework and .NET Core 2.2 and earlier versions, if the <xref:System.Net.Http.HttpResponseMessage.Content%2A> is not `null`, this method also calls <xref:System.Net.Http.HttpResponseMessage.Dispose%2A> to free managed and unmanaged resources. Starting with .NET Core 3.0, the content is not disposed.
0 commit comments