diff --git a/src/VaultSharp/Core/Polymath.cs b/src/VaultSharp/Core/Polymath.cs
index bab2e03..84637c3 100644
--- a/src/VaultSharp/Core/Polymath.cs
+++ b/src/VaultSharp/Core/Polymath.cs
@@ -12,6 +12,7 @@
using VaultSharp.V1.Commons;
using System.Text.Json.Nodes;
using System.Text.Json;
+using System.Net.Http.Json;
namespace VaultSharp.Core
{
@@ -199,7 +200,7 @@ public async Task MakeVaultApiRequest(string resourcePath, HttpMethod httpMethod
var requestUri = new Uri(_httpClient.BaseAddress, new Uri(resourcePath, UriKind.Relative));
var requestContent = requestData != null
- ? new StringContent(JsonSerializer.Serialize(requestData), Encoding.UTF8)
+ ? JsonContent.Create(requestData)
: null;
HttpRequestMessage httpRequestMessage = null;
@@ -233,7 +234,7 @@ public async Task MakeVaultApiRequest(string resourcePath, HttpMethod httpMethod
httpRequestMessage = new HttpRequestMessage(httpMethod, requestUri)
{
Content = requestData != null
- ? new StringContent(JsonSerializer.Serialize(requestData), Encoding.UTF8, "application/merge-patch+json")
+ ? JsonContent.Create(requestData, mediaType: new System.Net.Http.Headers.MediaTypeHeaderValue("application/merge-patch+json"))
: null
};
diff --git a/src/VaultSharp/VaultSharp.csproj b/src/VaultSharp/VaultSharp.csproj
index 4accb0c..4778562 100644
--- a/src/VaultSharp/VaultSharp.csproj
+++ b/src/VaultSharp/VaultSharp.csproj
@@ -96,6 +96,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -105,6 +108,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -114,6 +120,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -123,6 +132,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -136,6 +148,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -149,6 +164,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -160,6 +178,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+
@@ -170,6 +191,9 @@ This library is built with .NET Standard 2.0, .NET Standard 2.1, 4.6.2, 4.7.2*,
7.0.2
+
+ 7.0.1
+