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..e9f1d69 --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/API/HttpContentType.cs @@ -0,0 +1,23 @@ +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 + } +} 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); } } 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