diff --git a/Projects/AWSRedrive.LinuxService/AWSRedrive.LinuxService.csproj b/Projects/AWSRedrive.LinuxService/AWSRedrive.LinuxService.csproj index d852feb..5a2cee5 100644 --- a/Projects/AWSRedrive.LinuxService/AWSRedrive.LinuxService.csproj +++ b/Projects/AWSRedrive.LinuxService/AWSRedrive.LinuxService.csproj @@ -3,7 +3,7 @@ net6.0 {E2CEBBAF-6DF7-41E9-815D-9AD4CF90C845} - 1.0.8 + 1.0.9 diff --git a/Projects/AWSRedrive.console/AWSRedrive.console.csproj b/Projects/AWSRedrive.console/AWSRedrive.console.csproj index 8b62544..f5bf93d 100644 --- a/Projects/AWSRedrive.console/AWSRedrive.console.csproj +++ b/Projects/AWSRedrive.console/AWSRedrive.console.csproj @@ -3,7 +3,7 @@ Exe net6.0 - 1.0.8 + 1.0.9 diff --git a/Projects/AWSRedrive/AWSRedrive.csproj b/Projects/AWSRedrive/AWSRedrive.csproj index 88a5510..8c61912 100644 --- a/Projects/AWSRedrive/AWSRedrive.csproj +++ b/Projects/AWSRedrive/AWSRedrive.csproj @@ -3,7 +3,7 @@ net6.0 {E2CEBBAF-6DF7-41E9-815D-9AD4CF90C844} - 1.0.8 + 1.0.9 diff --git a/Projects/AWSRedrive/ConfigurationEntry.cs b/Projects/AWSRedrive/ConfigurationEntry.cs index 12bd652..d96d3ac 100644 --- a/Projects/AWSRedrive/ConfigurationEntry.cs +++ b/Projects/AWSRedrive/ConfigurationEntry.cs @@ -20,6 +20,7 @@ public class ConfigurationEntry public bool Active { get; set; } public bool UsePUT { get; set; } public bool UseGET { get; set; } + public bool UseDelete { get; set; } public int? Timeout { get; set; } public bool IgnoreCertificateErrors { get; set; } public string ServiceUrl { get; set; } diff --git a/Projects/AWSRedrive/HttpMessageProcessor.cs b/Projects/AWSRedrive/HttpMessageProcessor.cs index 63008fd..d457e9a 100644 --- a/Projects/AWSRedrive/HttpMessageProcessor.cs +++ b/Projects/AWSRedrive/HttpMessageProcessor.cs @@ -35,7 +35,7 @@ public void ProcessMessage(string message, Dictionary attributes private RestRequest CreateRequest(string message, Uri uri, ConfigurationEntry configurationEntry) { return !configurationEntry.UseGET - ? CreatePostOrPutRequest(message, uri, configurationEntry) + ? CreatePostOrPutOrDeleteRequest(message, uri, configurationEntry) : CreateGetRequest(message, uri); } @@ -59,9 +59,9 @@ private RestRequest CreateGetRequest(string message, Uri uri) return request; } - private RestRequest CreatePostOrPutRequest(string message, Uri uri, ConfigurationEntry configurationEntry) + private RestRequest CreatePostOrPutOrDeleteRequest(string message, Uri uri, ConfigurationEntry configurationEntry) { - var request = new RestRequest(uri.PathAndQuery, configurationEntry.UsePUT ? Method.Put : Method.Post); + var request = new RestRequest(uri.PathAndQuery, configurationEntry.UseDelete ? Method.Delete : configurationEntry.UsePUT ? Method.Put : Method.Post); request.AddStringBody(message, DataFormat.Json);