-Aggiunta dei servizi di connessione REST base, di SAP e di Salesforce
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataConnection.REST.Interfaces
|
||||
@@ -27,6 +28,15 @@ namespace DataConnection.REST.Interfaces
|
||||
/// <returns>The deserialized response content.</returns>
|
||||
Task<TResponse?> PostAsync<TRequest, TResponse>(string requestUri, TRequest payload, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new entity by sending a POST request with the provided data.
|
||||
/// </summary>
|
||||
/// <param name="entityName">The name of the entity to create.</param>
|
||||
/// <param name="entityData">The data for the new entity as key-value pairs.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The created entity data or null if creation failed.</returns>
|
||||
Task<Dictionary<string, object>?> CreateEntityAsync(string entityName, Dictionary<string, object> entityData, CancellationToken cancellationToken = default);
|
||||
|
||||
// Add other methods as needed (PUT, DELETE, PATCH, etc.)
|
||||
// Consider adding methods for handling raw HttpResponseMessage or string responses
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user