Skip to content

Commit 8df956d

Browse files
committed
Fix SYSLIB0014 warning related to use of WebRequest-related types
Replace use of obsolete WebRequest-related types with that of HttpClient-related ones. This was done in several steps, ultimately squashed into a single commit: - Claude did the heavy lifting - Manual tweaks were made afterwards, to make code changes a little cleaner This introduces breaking Changes: - ⚠ Users can no longer override GetResponse(), GetResponseAsync(), or GetRequestStream() methods - ✅ Migration path: Use IHttpMessageHandler interface instead
1 parent 69eb252 commit 8df956d

17 files changed

+792
-524
lines changed

NGitLab.Mock/NGitLab.Mock.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2323
</PackageReference>
2424
</ItemGroup>
25-
</Project>
25+
</Project>

NGitLab.Tests/Docker/GitLabTestContext.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Globalization;
66
using System.IO;
77
using System.Linq;
8-
using System.Net;
98
using System.Net.Http;
109
using System.Runtime.InteropServices;
1110
using System.Security.Cryptography;
@@ -74,7 +73,7 @@ public static async Task<GitLabTestContext> CreateAsync()
7473

7574
public IGitLabClient Client { get; }
7675

77-
public WebRequest LastRequest => _customRequestOptions.AllRequests[_customRequestOptions.AllRequests.Count - 1];
76+
public HttpRequestMessage LastRequest => _customRequestOptions.AllRequests[_customRequestOptions.AllRequests.Count - 1];
7877

7978
private static bool IsUnique(string str)
8079
{

0 commit comments

Comments
 (0)