add support for REST-ful API building

- allow parameters within url
- allow different methods other then just POST
-> still needs to be tested!
This commit is contained in:
Pilzinsel64
2024-11-28 09:03:48 +01:00
parent 74ebbbca7b
commit 9dcaa7e507
9 changed files with 239 additions and 53 deletions

View File

@@ -14,13 +14,21 @@ public interface IApiClient
Task<ApiResponse> SendRequest(string route);
Task<ApiResponse> SendRequest(string route, HttpMethod method);
Task<ApiResponse> SendRequest(string route, ApiMessage? message);
Task<ApiResponse> SendRequest(string route, ApiMessage? message, IApiMessageSerializer? serializer);
Task<ApiResponse> SendRequest(string route, HttpMethod method, ApiMessage? message);
Task<ApiResponse> SendRequest(string route, HttpMethod method, ApiMessage? message, IApiMessageSerializer? serializer);
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route) where TResponse : ApiMessage;
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, HttpMethod method) where TResponse : ApiMessage;
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, ApiMessage? message) where TResponse : ApiMessage;
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, ApiMessage? message, IApiMessageSerializer? serializer) where TResponse : ApiMessage;
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, HttpMethod method, ApiMessage? message) where TResponse : ApiMessage;
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, HttpMethod method, ApiMessage? message, IApiMessageSerializer? serializer) where TResponse : ApiMessage;
}