7346db3b63
feat: Add SqlServerSchemaProvider for extracting database schema information from SQL Server feat: Introduce DatabaseType and NamingStrategy enums for better database management and naming conventions feat: Create IDatabaseDiscovery and IDatabaseManager interfaces for database operations and metadata retrieval feat: Develop REST service client architecture with BaseRestServiceClient and SAP Business One specific implementation feat: Implement REST service discovery page with UI for connecting to SAP Business One Service Layer and displaying discovered entities
34 lines
1.6 KiB
C#
34 lines
1.6 KiB
C#
using System.Threading.Tasks;
|
|
|
|
namespace DataConnection.REST.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Interface for a generic REST service client.
|
|
/// </summary>
|
|
public interface IRestServiceClient
|
|
{
|
|
/// <summary>
|
|
/// Sends a GET request to the specified URI.
|
|
/// </summary>
|
|
/// <typeparam name="T">The type of the object to deserialize the response content to.</typeparam>
|
|
/// <param name="requestUri">The URI the request is sent to.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The deserialized response content.</returns>
|
|
Task<T?> GetAsync<T>(string requestUri, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Sends a POST request to the specified URI.
|
|
/// </summary>
|
|
/// <typeparam name="TRequest">The type of the request object.</typeparam>
|
|
/// <typeparam name="TResponse">The type of the object to deserialize the response content to.</typeparam>
|
|
/// <param name="requestUri">The URI the request is sent to.</param>
|
|
/// <param name="payload">The HTTP request content sent to the server.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The deserialized response content.</returns>
|
|
Task<TResponse?> PostAsync<TRequest, TResponse>(string requestUri, TRequest payload, CancellationToken cancellationToken = default);
|
|
|
|
// Add other methods as needed (PUT, DELETE, PATCH, etc.)
|
|
// Consider adding methods for handling raw HttpResponseMessage or string responses
|
|
}
|
|
}
|