From 04058f12c18d9c7dce5009ebfcc9437ea3c788fa Mon Sep 17 00:00:00 2001 From: BlossomiShymae <87099578+BlossomiShymae@users.noreply.github.com> Date: Fri, 16 Aug 2024 01:30:39 -0500 Subject: [PATCH] Bump version, fix bug where whitespace in request body is removed --- Needlework.Net.Desktop/Needlework.Net.Desktop.csproj | 4 ++-- Needlework.Net.Desktop/ViewModels/ConsoleViewModel.cs | 3 +-- Needlework.Net.Desktop/ViewModels/PathOperationViewModel.cs | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Needlework.Net.Desktop/Needlework.Net.Desktop.csproj b/Needlework.Net.Desktop/Needlework.Net.Desktop.csproj index be22c18..589547a 100644 --- a/Needlework.Net.Desktop/Needlework.Net.Desktop.csproj +++ b/Needlework.Net.Desktop/Needlework.Net.Desktop.csproj @@ -11,8 +11,8 @@ False app.ico NeedleworkDotNet - 0.4.1.0 - 0.4.1.0 + 0.4.2.0 + 0.4.2.0 False diff --git a/Needlework.Net.Desktop/ViewModels/ConsoleViewModel.cs b/Needlework.Net.Desktop/ViewModels/ConsoleViewModel.cs index ada8b48..93bf04d 100644 --- a/Needlework.Net.Desktop/ViewModels/ConsoleViewModel.cs +++ b/Needlework.Net.Desktop/ViewModels/ConsoleViewModel.cs @@ -8,7 +8,6 @@ using System; using System.Net.Http; using System.Text.Json; -using System.Text.RegularExpressions; using System.Threading.Tasks; namespace Needlework.Net.Desktop.ViewModels @@ -59,7 +58,7 @@ private async Task SendRequest() var processInfo = Connector.GetProcessInfo(); var requestBody = WeakReferenceMessenger.Default.Send(new ContentRequestMessage(), "ConsoleRequestEditor").Response; - var content = new StringContent(Regex.Replace(requestBody, @"\s+", ""), new System.Net.Http.Headers.MediaTypeHeaderValue("application/json")); + var content = new StringContent(requestBody, new System.Net.Http.Headers.MediaTypeHeaderValue("application/json")); var response = await Connector.SendAsync(method, RequestPath, content) ?? throw new Exception("Response is null."); var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken); var body = await response.Content.ReadAsStringAsync(); diff --git a/Needlework.Net.Desktop/ViewModels/PathOperationViewModel.cs b/Needlework.Net.Desktop/ViewModels/PathOperationViewModel.cs index fa4c053..d9ffb41 100644 --- a/Needlework.Net.Desktop/ViewModels/PathOperationViewModel.cs +++ b/Needlework.Net.Desktop/ViewModels/PathOperationViewModel.cs @@ -8,7 +8,6 @@ using System; using System.Net.Http; using System.Text.Json; -using System.Text.RegularExpressions; using System.Threading.Tasks; namespace Needlework.Net.Desktop.ViewModels @@ -91,7 +90,7 @@ public async Task SendRequest() var uri = $"{path}{query}"; var requestBody = WeakReferenceMessenger.Default.Send(new ContentRequestMessage(), "EndpointRequestEditor").Response; - var content = new StringContent(Regex.Replace(requestBody, @"\s+", ""), new System.Net.Http.Headers.MediaTypeHeaderValue("application/json")); + var content = new StringContent(requestBody, new System.Net.Http.Headers.MediaTypeHeaderValue("application/json")); var response = await Connector.SendAsync(method, $"{uri}", content) ?? throw new Exception("Response is null."); var riotAuthentication = new RiotAuthentication(processInfo.RemotingAuthToken);