System.Net.Http.WinHttpHandler 10.0.0-preview.2.25163.2

Prefix Reserved
This is a prerelease version of System.Net.Http.WinHttpHandler.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package System.Net.Http.WinHttpHandler --version 10.0.0-preview.2.25163.2
                    
NuGet\Install-Package System.Net.Http.WinHttpHandler -Version 10.0.0-preview.2.25163.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="10.0.0-preview.2.25163.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="10.0.0-preview.2.25163.2" />
                    
Directory.Packages.props
<PackageReference Include="System.Net.Http.WinHttpHandler" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add System.Net.Http.WinHttpHandler --version 10.0.0-preview.2.25163.2
                    
#r "nuget: System.Net.Http.WinHttpHandler, 10.0.0-preview.2.25163.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=System.Net.Http.WinHttpHandler&version=10.0.0-preview.2.25163.2&prerelease
                    
Install System.Net.Http.WinHttpHandler as a Cake Addin
#tool nuget:?package=System.Net.Http.WinHttpHandler&version=10.0.0-preview.2.25163.2&prerelease
                    
Install System.Net.Http.WinHttpHandler as a Cake Tool

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 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.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

  • .NETStandard 2.0

    • No dependencies.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (89)

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 (33)

Showing the top 20 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.
win-acme/win-acme
A simple ACME client for Windows (for use with Let's Encrypt et al.)
grpc/grpc-dotnet
gRPC for .NET
aspnet/KestrelHttpServer
[Archived] A cross platform web server for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
aspnet/Benchmarks
Benchmarks for ASP.NET Core
BedrockLauncher/BedrockLauncher
AlexWan/OsEngine
Open Source algo trading platform
mili-tan/AuroraDNS.GUI
纯净抗污染,简单轻量级
Kyrodan/KeeAnywhere
A cloud storage provider plugin for KeePass Password Safe
PlayFab/consuldotnet
.NET API for Consul (http://www.consul.io/)
chummer5a/chummer5a
Character generator for Shadowrun 5th edition
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
rajanadar/VaultSharp
A comprehensive cross-platform .NET Library for HashiCorp's Vault, a secret management tool
DataDog/dd-trace-dotnet
.NET Client Library for Datadog APM
apache/arrow-adbc
Database connectivity API standard and libraries for Apache Arrow
microsoft/RTVS
R Tools for Visual Studio.
projectkudu/ARMClient
A simple command line tool to invoke the Azure Resource Manager API
microsoft/data-accelerator
Data Accelerator for Apache Spark simplifies onboarding to Streaming of Big Data. It offers a rich, easy to use experience to help with creation, editing and management of Spark jobs on Azure HDInsights or Databricks while enabling the full power of the Spark engine.
microsoft/service-fabric-services-and-actors-dotnet
Reliable Services and Reliable Actors are Service Fabric application frameworks for building highly-scalable distributed cloud applications.
Version Downloads Last updated
10.0.0-preview.3.25171.5 0 4/10/2025
10.0.0-preview.2.25163.2 1,284 3/18/2025
10.0.0-preview.1.25080.5 793 2/25/2025
9.0.4 1,137 4/8/2025
9.0.3 26,504 3/11/2025
9.0.2 37,313 2/11/2025
9.0.1 164,350 1/14/2025
9.0.0 101,599 11/12/2024
9.0.0-rc.2.24473.5 2,194 10/8/2024
9.0.0-rc.1.24431.7 11,254 9/10/2024
9.0.0-preview.7.24405.7 923 8/13/2024
9.0.0-preview.6.24327.7 2,832 7/9/2024
9.0.0-preview.5.24306.7 558 6/11/2024
9.0.0-preview.4.24266.19 1,063 5/21/2024
9.0.0-preview.3.24172.9 4,115 4/11/2024
9.0.0-preview.2.24128.5 638 3/12/2024
9.0.0-preview.1.24080.9 6,360 2/13/2024
8.0.2 1,453,731 8/13/2024
8.0.1 249,456 7/9/2024
8.0.0 3,200,226 11/14/2023
8.0.0-rc.2.23479.6 4,712 10/10/2023
8.0.0-rc.1.23419.4 3,750 9/12/2023
8.0.0-preview.7.23375.6 4,956 8/8/2023
8.0.0-preview.6.23329.7 1,089 7/11/2023
8.0.0-preview.5.23280.8 2,260 6/13/2023
8.0.0-preview.4.23259.5 4,785 5/16/2023
8.0.0-preview.3.23174.8 9,240 4/11/2023
8.0.0-preview.2.23128.3 2,686 3/14/2023
8.0.0-preview.1.23110.8 3,518 2/21/2023
7.0.0 5,247,066 11/7/2022
7.0.0-rc.2.22472.3 3,378 10/11/2022
7.0.0-rc.1.22426.10 5,478 9/14/2022
7.0.0-preview.7.22375.6 4,619 8/9/2022
7.0.0-preview.6.22324.4 1,097 7/12/2022
7.0.0-preview.5.22301.12 1,873 6/14/2022
7.0.0-preview.4.22229.4 5,070 5/10/2022
7.0.0-preview.3.22175.4 11,643 4/13/2022
7.0.0-preview.2.22152.2 5,898 3/14/2022
7.0.0-preview.1.22076.8 1,613 2/17/2022
6.0.1 6,794,946 4/12/2022
6.0.0 3,507,349 11/8/2021
6.0.0-rc.2.21480.5 1,984 10/12/2021
6.0.0-rc.1.21451.13 69,457 9/14/2021
6.0.0-preview.7.21377.19 4,153 8/10/2021
6.0.0-preview.6.21352.12 5,124 7/14/2021
6.0.0-preview.5.21301.5 1,603 6/15/2021
6.0.0-preview.4.21253.7 24,914 5/24/2021
6.0.0-preview.3.21201.4 26,906 4/8/2021
6.0.0-preview.2.21154.6 4,355 3/11/2021
6.0.0-preview.1.21102.12 23,887 2/12/2021
5.0.0 5,305,797 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.5 3,425 10/13/2020
5.0.0-rc.1.20451.14 2,141 9/14/2020
5.0.0-preview.8.20407.11 1,625 8/25/2020
5.0.0-preview.7.20364.11 4,533 7/21/2020
5.0.0-preview.6.20305.6 1,899 6/25/2020
5.0.0-preview.5.20278.1 1,860 6/10/2020
5.0.0-preview.4.20251.6 5,180 5/18/2020
5.0.0-preview.3.20214.6 1,509 4/23/2020
5.0.0-preview.2.20160.6 2,140 4/2/2020
5.0.0-preview.1.20120.5 2,955 3/16/2020
4.7.2 1,737,541 6/9/2020
4.7.0 8,436,666 12/3/2019
4.7.0-preview3.19551.4 3,990 11/13/2019
4.7.0-preview2.19523.17 2,039 11/1/2019
4.7.0-preview1.19504.10 5,123 10/15/2019
4.6.0 1,196,996 9/23/2019
4.6.0-rc1.19456.4 8,268 9/16/2019
4.6.0-preview9.19421.4 1,769 9/4/2019
4.6.0-preview9.19416.11 1,055 9/4/2019
4.6.0-preview8.19405.3 3,241 8/13/2019
4.6.0-preview7.19362.9 4,025 7/23/2019
4.6.0-preview6.19303.8 4,234 6/12/2019
4.6.0-preview6.19264.9 1,065 9/4/2019
4.6.0-preview5.19224.8 1,708 5/6/2019
4.6.0-preview4.19212.13 1,208 4/18/2019
4.6.0-preview3.19128.7 10,036 3/6/2019
4.6.0-preview.19073.11 3,079 1/29/2019
4.6.0-preview.18571.3 5,423 12/3/2018
4.5.4 3,555,371 5/30/2019
4.5.3 594,036 4/9/2019 4.5.3 has at least one vulnerability with high severity.
4.5.2 4,952,810 1/8/2019 4.5.2 has at least one vulnerability with high severity.
4.5.2-servicing-27114-05 3,578 11/28/2018 4.5.2-servicing-27114-05 has at least one vulnerability with high severity.
4.5.1 452,628 10/1/2018 4.5.1 has at least one vulnerability with high severity.
4.5.0 6,243,600 5/29/2018 4.5.0 has at least one vulnerability with high severity.
4.5.0-rc1 3,002 5/6/2018 4.5.0-rc1 has at least one vulnerability with high severity.
4.5.0-preview2-26406-04 3,362 4/10/2018 4.5.0-preview2-26406-04 has at least one vulnerability with high severity.
4.5.0-preview1-26216-02 20,302 2/26/2018 4.5.0-preview1-26216-02 has at least one vulnerability with high severity.
4.4.0 53,275,661 8/11/2017 4.4.0 has at least one vulnerability with high severity.
4.4.0-preview2-25405-01 16,890 6/27/2017 4.4.0-preview2-25405-01 has at least one vulnerability with high severity.
4.4.0-preview1-25305-02 8,221 5/9/2017 4.4.0-preview1-25305-02 has at least one vulnerability with high severity.
4.3.3 8,697 10/9/2018 4.3.3 has at least one vulnerability with high severity.
4.3.2 66,148 9/20/2017 4.3.2 has at least one vulnerability with high severity.
4.3.1 78,661 5/9/2017 4.3.1 has at least one vulnerability with high severity.
4.3.0 160,366 11/15/2016 4.3.0 has at least one vulnerability with high severity.
4.3.0-preview1-24530-04 14,100 10/24/2016
4.0.4 18,379 10/9/2018
4.0.3 5,178 9/20/2017
4.0.2 42,392 5/9/2017
4.0.1 202,544 12/13/2016
4.0.0 20,161,165 6/27/2016 4.0.0 has at least one vulnerability with high severity.
4.0.0-rc2-24027 9,779 5/16/2016
4.0.0-beta-23516 9,936 11/18/2015
4.0.0-beta-23409 15,047 10/15/2015
4.0.0-beta-23225 12,421 9/2/2015
4.0.0-beta-23123 4,274 7/29/2015
4.0.0-beta-23109 9,201 7/27/2015
4.0.0-beta-23019 16,302 6/30/2015
4.0.0-beta-22816 16,510 4/24/2015
4.0.0-beta-22605 6,044 2/13/2015
4.0.0-beta-22416 3,570 1/16/2015
4.0.0-beta-22231 6,294 11/11/2014