From 1ca636c64e7ea76ef0075d66d1eeb23b64d41f37 Mon Sep 17 00:00:00 2001 From: Alexandru Gal Date: Fri, 11 Feb 2022 00:03:09 +0200 Subject: [PATCH 1/5] Update IHttpClient Put, Patch and Post methods with an optional parameter --- .../Models/Credentials/API/IHttpClient.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/API/IHttpClient.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/API/IHttpClient.cs index 21fbf52..e024bc3 100644 --- a/Ringhel.Procesio.Action.Core/Models/Credentials/API/IHttpClient.cs +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/API/IHttpClient.cs @@ -33,8 +33,9 @@ public interface IHttpClient /// Query parameters /// Header parameters /// Payload + /// /// - Task PutAsync(string endpoint, Dictionary queryParameters, Dictionary headerParameters, object body); + Task PutAsync(string endpoint, Dictionary queryParameters, Dictionary headerParameters, object body, HttpContentType httpContentType = HttpContentType.Json); /// /// Post method. @@ -43,8 +44,9 @@ public interface IHttpClient /// Query parameters /// Header parameters /// Payload + /// /// - Task PostAsync(string endpoint, Dictionary queryParameters, Dictionary headerParameters, object body); + Task PostAsync(string endpoint, Dictionary queryParameters, Dictionary headerParameters, object body, HttpContentType httpContentType = HttpContentType.Json); /// /// Patch method. @@ -53,7 +55,8 @@ public interface IHttpClient /// Query parameters /// Header parameters /// Payload + /// /// - Task PatchAsync(string endpoint, Dictionary queryParameters, Dictionary headerParameters, object body); + Task PatchAsync(string endpoint, Dictionary queryParameters, Dictionary headerParameters, object body, HttpContentType httpContentType = HttpContentType.Json); } } From a15037ae3ba1bdf25702ff942c7bd42f56eab351 Mon Sep 17 00:00:00 2001 From: Alexandru Gal Date: Fri, 11 Feb 2022 00:03:18 +0200 Subject: [PATCH 2/5] Add HttpContentType enum --- .../Models/Credentials/API/HttpContentType.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs new file mode 100644 index 0000000..166b644 --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Ringhel.Procesio.Action.Core.Models.Credentials.API +{ + public enum HttpContentType + { + None = 0, + Json = 1, + FormData = 2, + FormUrlEncoded = 3, + FileMultipart = 4 + } +} From 9ee3141b276b1d1195f94896a0f96557586671a6 Mon Sep 17 00:00:00 2001 From: Alexandru Gal Date: Fri, 11 Feb 2022 11:57:26 +0200 Subject: [PATCH 3/5] Add comments to Enum values. --- .../Models/Credentials/API/HttpContentType.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs index 166b644..e9f1d69 100644 --- a/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs @@ -1,15 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Ringhel.Procesio.Action.Core.Models.Credentials.API +namespace Ringhel.Procesio.Action.Core.Models.Credentials.API { public enum HttpContentType { None = 0, + /// + /// The body should be a Json object + /// Json = 1, + /// + /// The body requires a Dictionary object + /// FormData = 2, + /// + /// The body requires a Dictionary object + /// FormUrlEncoded = 3, + /// + /// The body has to be of type Action.Core.FileModel + /// FileMultipart = 4 } } From 6342ea8a6929983794cb5f476e74b9f214d79c37 Mon Sep 17 00:00:00 2001 From: Alexandru Gal Date: Fri, 11 Feb 2022 11:58:43 +0200 Subject: [PATCH 4/5] Bump version to 1.16.0.4 --- .../Ringhel.Procesio.Action.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj b/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj index 026abbe..df4983a 100644 --- a/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj +++ b/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj @@ -7,7 +7,7 @@ Ringhel Procesio https://github.com/PROCESIO/Action-Core.git - 1.16.0.3 + 1.16.0.4 Ringhel.Procesio.Action.Core Ringhel.Procesio.Action.Core Ringhel.Procesio.Action.Core From 618f6cbecd5512e2dafe24cbec625b4bb5a86def Mon Sep 17 00:00:00 2001 From: Alexandru Gal Date: Fri, 11 Feb 2022 12:17:53 +0200 Subject: [PATCH 5/5] Bump version to 1.16.1.5 --- .../Ringhel.Procesio.Action.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj b/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj index d89c85e..4f46fee 100644 --- a/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj +++ b/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj @@ -7,7 +7,7 @@ Ringhel Procesio https://github.com/PROCESIO/Action-Core.git - 1.16.1.4 + 1.16.1.5 Ringhel.Procesio.Action.Core Ringhel.Procesio.Action.Core Ringhel.Procesio.Action.Core