Skip to content

Commit 0e12f0a

Browse files
authored
Clarify UseSocketsHttpHandler availability in versions (#7307)
1 parent 3a1953e commit 0e12f0a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xml/System.Net.Http/HttpClientHandler.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ The `HttpClientHandler` class and classes derived from it enable developers to c
4040
4141
### HttpClientHandler in .NET Core
4242
43-
Starting in .NET Core 2.1, the implementation of the `HttpClientHandler` class was changed to be based on the cross-platform HTTP protocol stack used by the <xref:System.Net.Http.SocketsHttpHandler?displayProperty=nameWithType> class. Prior to .NET Core 2.1, the `HttpClientHandler` class used older HTTP protocol stacks (<xref:System.Net.Http.WinHttpHandler> on Windows and `CurlHandler`, an internal class implemented on top of Linux's native libcurl component, on Linux).
43+
Starting in .NET Core 2.1, the implementation of the `HttpClientHandler` class was changed to be based on the cross-platform HTTP protocol stack used by the <xref:System.Net.Http.SocketsHttpHandler?displayProperty=nameWithType> class. Prior to .NET Core 2.1, the `HttpClientHandler` class used older HTTP protocol stacks (<xref:System.Net.Http.WinHttpHandler> on Windows and `CurlHandler`, an internal class implemented on top of Linux's native `libcurl` component, on Linux).
4444
45-
You can configure your app to use the older HTTP protocol stacks in one of the following three ways:
45+
On .NET Core 2.1 - 3.1 only, you can configure your app to use the older HTTP protocol stacks in one of the following three ways:
4646
4747
- Call the <xref:System.AppContext.SetSwitch%2A?displayProperty=nameWithType> method:
4848
@@ -66,6 +66,8 @@ You can configure your app to use the older HTTP protocol stacks in one of the f
6666
6767
- Define an environment variable named `DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER` and set it to either `false` or **0**.
6868
69+
These configuration options are not available starting with .NET 5.
70+
6971
## Examples
7072
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Misc/system.net.http.httpclienthandler/cs/source.cs" id="Snippet1":::
7173

0 commit comments

Comments
 (0)