System.Net.Http.WinHttpHandler
9.0.0
Prefix Reserved
dotnet add package System.Net.Http.WinHttpHandler --version 9.0.0
NuGet\Install-Package System.Net.Http.WinHttpHandler -Version 9.0.0
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="9.0.0" />
paket add System.Net.Http.WinHttpHandler --version 9.0.0
#r "nuget: System.Net.Http.WinHttpHandler, 9.0.0"
// Install System.Net.Http.WinHttpHandler as a Cake Addin #addin nuget:?package=System.Net.Http.WinHttpHandler&version=9.0.0 // Install System.Net.Http.WinHttpHandler as a Cake Tool #tool nuget:?package=System.Net.Http.WinHttpHandler&version=9.0.0
About
This package provides an HttpMessageHandler
implementation backed by Windows HTTP Services (WinHTTP).
While the use of the default HttpClientHandler
is highly recommended for applications targeting modern .NET, WinHttpHandler
might help migration scenarios by providing an alternative HTTP backend for Windows that works consistently accross .NET Framework and modern .NET.
Key Features
- Enables sending asynchronous HTTP requests with
HttpClient
on Windows. - Handles authentication and credentials.
- Exposes a subset of WinHTTP options as C# properties on
WinHttpHandler
. - Use custom proxy.
- Handle cookies.
How to Use
using System.Net;
using WinHttpHandler handler = new()
{
ServerCredentials = new NetworkCredential("usr", "pwd")
};
using HttpClient client = new(handler);
using HttpRequestMessage request = new(HttpMethod.Get, "https://httpbin.org/basic-auth/usr/pwd");
using HttpResponseMessage response = await client.SendAsync(request);
Console.WriteLine($"Status: {response.StatusCode}");
if (response.IsSuccessStatusCode)
{
string content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
Main Types
The main types provided by this library are:
System.Net.Http.WinHttpHandler
Additional Documentation
Feedback & Contributing
System.Net.Http.WinHttpHandler is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (90)
Showing the top 5 NuGet packages that depend on System.Net.Http.WinHttpHandler:
Package | Downloads |
---|---|
Grpc.Net.Client
.NET client for gRPC |
|
Microsoft.Graph.Core
Microsoft Graph Core Client Library implements core functionality used by Microsoft Graph client libraries. |
|
Microsoft.Kiota.Http.HttpClientLibrary
Kiota Http provider implementation for dotnet with HttpClient. |
|
Microsoft.Azure.DocumentDB
Please note, a newer package, Microsoft.Azure.Cosmos, is available. While this package will continue to receive critical bug fixes, we strongly encourage you to upgrade. See https://aka.ms/migrate-to-cosmos-dotnet-v3 for more details. This client library enables client applications to connect to Azure Cosmos DB via the NoSQL API. Azure Cosmos DB is a globally distributed, multi-model database service. |
|
VaultSharp
The most comprehensive .NET Library for HashiCorp's Vault which is a modern secret management system. * VaultSharp supports all Auth methods, all Secrets Engines and most System Apis supported by Vault. * VaultSharp has first class support for Consul and Enterpise Vault APIs etc. * Enterprise APIs like Control Groups, Transform Secrets Engine & KMIP Secrets Engine etc. This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*, 4.8, .NET 6, .NET 7 and .NET 8 and hence is cross-platform across .NET Core 2.x, 3.x, .NET Frameworks 4.x, Xamarin iOS, Android, Mac, UWP etc. |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on System.Net.Http.WinHttpHandler:
Repository | Stars |
---|---|
PowerShell/PowerShell
PowerShell for every system!
|
|
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
|
Version | Downloads | Last updated | |
---|---|---|---|
9.0.0 | 6,079 | 11/12/2024 | |
9.0.0-rc.2.24473.5 | 1,761 | 10/8/2024 | |
9.0.0-rc.1.24431.7 | 4,752 | 9/10/2024 | |
9.0.0-preview.7.24405.7 | 713 | 8/13/2024 | |
9.0.0-preview.6.24327.7 | 2,675 | 7/9/2024 | |
9.0.0-preview.5.24306.7 | 447 | 6/11/2024 | |
9.0.0-preview.4.24266.19 | 719 | 5/21/2024 | |
9.0.0-preview.3.24172.9 | 3,991 | 4/11/2024 | |
9.0.0-preview.2.24128.5 | 544 | 3/12/2024 | |
9.0.0-preview.1.24080.9 | 5,856 | 2/13/2024 | |
8.0.2 | 490,287 | 8/13/2024 | |
8.0.1 | 176,911 | 7/9/2024 | |
8.0.0 | 2,073,742 | 11/14/2023 | |
8.0.0-rc.2.23479.6 | 4,526 | 10/10/2023 | |
8.0.0-rc.1.23419.4 | 3,615 | 9/12/2023 | |
8.0.0-preview.7.23375.6 | 4,832 | 8/8/2023 | |
8.0.0-preview.6.23329.7 | 973 | 7/11/2023 | |
8.0.0-preview.5.23280.8 | 2,151 | 6/13/2023 | |
8.0.0-preview.4.23259.5 | 4,672 | 5/16/2023 | |
8.0.0-preview.3.23174.8 | 7,842 | 4/11/2023 | |
8.0.0-preview.2.23128.3 | 2,219 | 3/14/2023 | |
8.0.0-preview.1.23110.8 | 3,410 | 2/21/2023 | |
7.0.0 | 4,388,832 | 11/7/2022 | |
7.0.0-rc.2.22472.3 | 3,273 | 10/11/2022 | |
7.0.0-rc.1.22426.10 | 5,263 | 9/14/2022 | |
7.0.0-preview.7.22375.6 | 4,512 | 8/9/2022 | |
7.0.0-preview.6.22324.4 | 978 | 7/12/2022 | |
7.0.0-preview.5.22301.12 | 1,700 | 6/14/2022 | |
7.0.0-preview.4.22229.4 | 4,879 | 5/10/2022 | |
7.0.0-preview.3.22175.4 | 6,518 | 4/13/2022 | |
7.0.0-preview.2.22152.2 | 5,785 | 3/14/2022 | |
7.0.0-preview.1.22076.8 | 1,507 | 2/17/2022 | |
6.0.1 | 6,083,102 | 4/12/2022 | |
6.0.0 | 2,913,781 | 11/8/2021 | |
6.0.0-rc.2.21480.5 | 1,859 | 10/12/2021 | |
6.0.0-rc.1.21451.13 | 65,111 | 9/14/2021 | |
6.0.0-preview.7.21377.19 | 3,982 | 8/10/2021 | |
6.0.0-preview.6.21352.12 | 4,965 | 7/14/2021 | |
6.0.0-preview.5.21301.5 | 1,488 | 6/15/2021 | |
6.0.0-preview.4.21253.7 | 24,011 | 5/24/2021 | |
6.0.0-preview.3.21201.4 | 26,717 | 4/8/2021 | |
6.0.0-preview.2.21154.6 | 4,204 | 3/11/2021 | |
6.0.0-preview.1.21102.12 | 22,390 | 2/12/2021 | |
5.0.0 | 4,831,689 | 11/9/2020 | |
5.0.0-rc.2.20475.5 | 3,301 | 10/13/2020 | |
5.0.0-rc.1.20451.14 | 2,022 | 9/14/2020 | |
5.0.0-preview.8.20407.11 | 1,501 | 8/25/2020 | |
5.0.0-preview.7.20364.11 | 4,393 | 7/21/2020 | |
5.0.0-preview.6.20305.6 | 1,772 | 6/25/2020 | |
5.0.0-preview.5.20278.1 | 1,728 | 6/10/2020 | |
5.0.0-preview.4.20251.6 | 4,943 | 5/18/2020 | |
5.0.0-preview.3.20214.6 | 1,386 | 4/23/2020 | |
5.0.0-preview.2.20160.6 | 2,005 | 4/2/2020 | |
5.0.0-preview.1.20120.5 | 2,829 | 3/16/2020 | |
4.7.2 | 1,655,702 | 6/9/2020 | |
4.7.0 | 7,786,140 | 12/3/2019 | |
4.7.0-preview3.19551.4 | 3,854 | 11/13/2019 | |
4.7.0-preview2.19523.17 | 1,915 | 11/1/2019 | |
4.7.0-preview1.19504.10 | 4,972 | 10/15/2019 | |
4.6.0 | 1,183,453 | 9/23/2019 | |
4.6.0-rc1.19456.4 | 8,151 | 9/16/2019 | |
4.6.0-preview9.19421.4 | 1,650 | 9/4/2019 | |
4.6.0-preview9.19416.11 | 935 | 9/4/2019 | |
4.6.0-preview8.19405.3 | 3,118 | 8/13/2019 | |
4.6.0-preview7.19362.9 | 3,906 | 7/23/2019 | |
4.6.0-preview6.19303.8 | 4,112 | 6/12/2019 | |
4.6.0-preview6.19264.9 | 946 | 9/4/2019 | |
4.6.0-preview5.19224.8 | 1,587 | 5/6/2019 | |
4.6.0-preview4.19212.13 | 1,096 | 4/18/2019 | |
4.6.0-preview3.19128.7 | 9,874 | 3/6/2019 | |
4.6.0-preview.19073.11 | 2,958 | 1/29/2019 | |
4.6.0-preview.18571.3 | 5,293 | 12/3/2018 | |
4.5.4 | 3,026,241 | 5/30/2019 | |
4.5.3 | 569,894 | 4/9/2019 | |
4.5.2 | 4,849,264 | 1/8/2019 | |
4.5.2-servicing-27114-05 | 3,431 | 11/28/2018 | |
4.5.1 | 436,629 | 10/1/2018 | |
4.5.0 | 6,026,153 | 5/29/2018 | |
4.5.0-rc1 | 2,805 | 5/6/2018 | |
4.5.0-preview2-26406-04 | 3,127 | 4/10/2018 | |
4.5.0-preview1-26216-02 | 20,065 | 2/26/2018 | |
4.4.0 | 50,733,822 | 8/11/2017 | |
4.4.0-preview2-25405-01 | 16,590 | 6/27/2017 | |
4.4.0-preview1-25305-02 | 8,017 | 5/9/2017 | |
4.3.3 | 8,368 | 10/9/2018 | |
4.3.2 | 65,911 | 9/20/2017 | |
4.3.1 | 78,268 | 5/9/2017 | |
4.3.0 | 158,973 | 11/15/2016 | |
4.3.0-preview1-24530-04 | 13,918 | 10/24/2016 | |
4.0.4 | 16,421 | 10/9/2018 | |
4.0.3 | 4,862 | 9/20/2017 | |
4.0.2 | 40,281 | 5/9/2017 | |
4.0.1 | 18,842 | 12/13/2016 | |
4.0.0 | 18,826,230 | 6/27/2016 | |
4.0.0-rc2-24027 | 9,596 | 5/16/2016 | |
4.0.0-beta-23516 | 9,753 | 11/18/2015 | |
4.0.0-beta-23409 | 14,864 | 10/15/2015 | |
4.0.0-beta-23225 | 12,032 | 9/2/2015 | |
4.0.0-beta-23123 | 4,082 | 7/29/2015 | |
4.0.0-beta-23109 | 9,012 | 7/27/2015 | |
4.0.0-beta-23019 | 16,120 | 6/30/2015 | |
4.0.0-beta-22816 | 16,279 | 4/24/2015 | |
4.0.0-beta-22605 | 5,608 | 2/13/2015 | |
4.0.0-beta-22416 | 3,336 | 1/16/2015 | |
4.0.0-beta-22231 | 6,058 | 11/11/2014 |