Skip to content

Commit 750581f

Browse files
Apply suggestions from code review
Co-authored-by: Genevieve Warren <[email protected]>
1 parent ac451bb commit 750581f

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

xml/System.Net.Http/HttpClient.xml

+12-24
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,7 @@ The <paramref name="requestUri" /> is not an absolute URI.
15931593
## Remarks
15941594
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
15951595
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
1596-
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`.
1597-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
1596+
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.
15981597
15991598
> [!NOTE]
16001599
> In case of timeout, different exceptions are thrown on different .NET implementations.
@@ -1669,8 +1668,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
16691668
## Remarks
16701669
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
16711670
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
1672-
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`.
1673-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
1671+
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.
16741672
16751673
> [!NOTE]
16761674
> In case of a timeout:
@@ -1742,8 +1740,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
17421740
## Remarks
17431741
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
17441742
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
1745-
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`.
1746-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
1743+
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.
17471744
17481745
> [!NOTE]
17491746
> In case of a timeout:
@@ -1811,8 +1808,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
18111808
## Remarks
18121809
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
18131810
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
1814-
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`.
1815-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
1811+
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.
18161812
18171813
> [!NOTE]
18181814
> In case of a timeout:
@@ -1910,8 +1906,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
19101906
## Remarks
19111907
This operation doesn't block. The returned [Task\<Stream>](xref:System.Threading.Tasks.Task%601) object will complete after the response headers are read. This method does not read or buffer the response body.
19121908
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
1913-
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`.
1914-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
1909+
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.
19151910
19161911
> [!NOTE]
19171912
> In case of a timeout:
@@ -1986,8 +1981,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
19861981
## Remarks
19871982
This operation doesn't block. The returned [Task\<Stream>](xref:System.Threading.Tasks.Task%601) object will complete after the response headers are read. This method does not read nor buffer the response body.
19881983
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
1989-
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`.
1990-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
1984+
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.
19911985
19921986
> [!NOTE]
19931987
> In case of a timeout:
@@ -2058,8 +2052,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
20582052
## Remarks
20592053
This operation doesn't block. The returned [Task\<Stream>](xref:System.Threading.Tasks.Task%601) object will complete after the response headers are read. This method does not read nor buffer the response body.
20602054
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
2061-
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`.
2062-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
2055+
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.
20632056
20642057
> [!NOTE]
20652058
> In case of a timeout:
@@ -2127,8 +2120,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
21272120
## Remarks
21282121
This operation doesn't block. The returned [Task\<Stream>](xref:System.Threading.Tasks.Task%601) object will complete after the response headers are read. This method does not read nor buffer the response body.
21292122
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
2130-
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`.
2131-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
2123+
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.
21322124
21332125
> [!NOTE]
21342126
> In case of a timeout:
@@ -2225,8 +2217,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
22252217
## Remarks
22262218
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
22272219
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
2228-
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`.
2229-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
2220+
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.
22302221
22312222
> [!NOTE]
22322223
> In case of a timeout:
@@ -2301,8 +2292,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
23012292
## Remarks
23022293
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
23032294
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
2304-
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`.
2305-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
2295+
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.
23062296
23072297
> [!NOTE]
23082298
> In case of a timeout:
@@ -2373,8 +2363,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
23732363
## Remarks
23742364
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
23752365
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
2376-
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`.
2377-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
2366+
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.
23782367
23792368
> [!NOTE]
23802369
> In case of a timeout:
@@ -2442,8 +2431,7 @@ The response status code was outside of the range of 200-299 (which indicate suc
24422431
## Remarks
24432432
This operation doesn't block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the whole response body is read.
24442433
Internally, this operation uses <xref:System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode%2A?displayProperty=nameWithType> to ensure the response status code is in the success range (200-299) and throws an <xref:System.Net.Http.HttpRequestException> if it is not.
2445-
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`.
2446-
In such cases we recommend to use the <xref:System.Net.Http.HttpClient.SendAsync%2A> method and check if <xref:System.Net.Http.HttpResponseMessage.StatusCode?displayProperty=nameWithType> matches the expected value(s).
2434+
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.
24472435
24482436
> [!NOTE]
24492437
> In case of a timeout:

0 commit comments

Comments
 (0)