This is a proposal for replacing the deprecated WebClient with the HttpClient. This commit implements the core functionality following the HttpClientFactory pattern as suggested by the framework. It also supports an alternative approach in areas where the HttpClient pattern is not desirable. The first backend component to be migrated is WebDav, and the HttpClient pattern is also applied to the update downloader. Once merged, other backend components can be migrated, eventually removing the deprecated WebClient from the codebase. Additionally, the debug-profind-file option from webdav, which was a remnant from early development, is removed as it is no longer useful for debugging different webdav server responses.
30 lines
1.0 KiB
XML
30 lines
1.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<OutputType>Library</OutputType>
|
|
<RootNamespace>Duplicati.Library.Utility</RootNamespace>
|
|
<Copyright>Copyright © 2024 Team Duplicati, MIT license</Copyright>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
|
<PackageReference Include="System.Management" Version="8.0.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Common\Duplicati.Library.Common.csproj" />
|
|
<ProjectReference Include="..\Interface\Duplicati.Library.Interface.csproj" />
|
|
<ProjectReference Include="..\Localization\Duplicati.Library.Localization.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
|
|
</Project>
|
|
|