Skip to content

Commit 060db12

Browse files
Apply suggestions from code review
Co-authored-by: Genevieve Warren <[email protected]>
1 parent e78a667 commit 060db12

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

xml/System.Net.Http/HttpClient.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,11 @@ The <paramref name="requestUri" /> is not an absolute URI.
600600
-or-
601601

602602
<see cref="P:System.Net.Http.HttpClient.BaseAddress" /> is not set.</exception>
603-
<exception cref="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 <see cref="P:System.Net.Http.HttpRequestException.HttpRequestError" />
603+
<exception cref="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 <see cref="P:System.Net.Http.HttpRequestException.HttpRequestError" />.
604604

605605
-or-
606606

607-
.NET Framework only: the request timed out.</exception>
607+
.NET Framework only: The request timed out.</exception>
608608
<exception cref="T:System.OperationCanceledException">.NET Core and .NET 5 and later only: The request failed due to timeout.</exception>
609609
</Docs>
610610
</Member>
@@ -1681,15 +1681,15 @@ the respose status code was outside of the range of 200-299 (status codes indica
16811681
]]></format>
16821682
</remarks>
16831683
<exception cref="T:System.InvalidOperationException">The <paramref name="requestUri" /> must be an absolute URI or <see cref="P:System.Net.Http.HttpClient.BaseAddress" /> must be set.</exception>
1684-
<exception cref="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 <see cref="P:System.Net.Http.HttpRequestException.HttpRequestError" />
1684+
<exception cref="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 <see cref="P:System.Net.Http.HttpRequestException.HttpRequestError" />.
16851685

16861686
-or-
16871687

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).
16891689

16901690
-or-
16911691

1692-
.NET Framework only: the request timed out.</exception>
1692+
.NET Framework only: The request timed out.</exception>
16931693
<exception cref="T:System.OperationCanceledException">.NET Core and .NET 5 and later only: The request failed due to timeout.</exception>
16941694
</Docs>
16951695
</Member>
@@ -2573,8 +2573,8 @@ The size specified is greater than the maximum allowed buffer size.</exception>
25732573
25742574
]]></format>
25752575
</remarks>
2576-
<exception cref="T:System.InvalidOperationException">The <paramref name="requestUri" /> must be an absolute URI or <see cref="P:System.Net.Http.HttpClient.BaseAddress" /> must be set.</exception>
2577-
<exception cref="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 <see cref="P:System.Net.Http.HttpRequestException.HttpRequestError" /></exception>
2576+
<exception cref="T:System.InvalidOperationException">The <paramref name="requestUri" /> is not an absolute URI and <see cref="P:System.Net.Http.HttpClient.BaseAddress" /> isn't set.</exception>
2577+
<exception cref="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 <see cref="P:System.Net.Http.HttpRequestException.HttpRequestError" />.</exception>
25782578
<exception cref="T:System.OperationCanceledException">The request failed due to timeout.</exception>
25792579
<exception cref="T:System.UriFormatException">The provided request URI is not valid relative or absolute URI.</exception>
25802580
</Docs>

xml/System.Net.Http/HttpResponseMessage.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,9 @@ When the `disposing` parameter is `true`, this method releases all resources hel
351351
<format type="text/markdown"><![CDATA[
352352
353353
## 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.
357357
358358
]]></format>
359359
</remarks>

0 commit comments

Comments
 (0)