From 6f3f08ed340e59a62a2d0428a5c32f99551ef1ce Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 3 Jun 2025 01:01:40 +0200 Subject: Fix performance issues, add fake user bot to test client, more testing --- testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs') diff --git a/testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs b/testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs index e4b4500..aa785cd 100644 --- a/testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs +++ b/testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs @@ -157,12 +157,15 @@ public class WrappedHttpClient "Access-Control-Allow-Methods", "Access-Control-Allow-Headers", "Access-Control-Expose-Headers", + "Access-Control-Allow-Credentials", "Cache-Control", "Cross-Origin-Resource-Policy", "X-Content-Security-Policy", "Referrer-Policy", "X-Robots-Tag", - "Content-Security-Policy" + "Content-Security-Policy", + "Keep-Alive", + "ETag" ])); return responseMessage; @@ -338,4 +341,12 @@ public class WrappedHttpClient }; return await SendAsync(request); } + + public async Task PatchAsJsonAsync(string url, T payload) { + var request = new HttpRequestMessage(HttpMethod.Patch, url) + { + Content = new StringContent(JsonSerializer.Serialize(payload), Encoding.UTF8, "application/json") + }; + return await SendAsync(request); + } } \ No newline at end of file -- cgit 1.5.1