summary refs log tree commit diff
path: root/testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs')
-rw-r--r--testFrontend/SafeNSound.Sdk/WrappedHttpClient.cs13
1 files changed, 12 insertions, 1 deletions
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<HttpResponseMessage> PatchAsJsonAsync<T>(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