diff --git a/ApiLibs/General/Service.cs b/ApiLibs/General/Service.cs index 2e63d45..9cc1ef6 100644 --- a/ApiLibs/General/Service.cs +++ b/ApiLibs/General/Service.cs @@ -18,7 +18,11 @@ public abstract class RestSharpService : Service protected RestSharpService(string hostUrl) : base(new RestSharpImplementation()) { (Implementation as RestSharpImplementation).Client = new RestClient(hostUrl); - // (Implementation as RestSharpImplementation).Client = Client; + } + + protected RestSharpService(RestClientOptions options) : base(new RestSharpImplementation()) + { + (Implementation as RestSharpImplementation).Client = new RestClient(options); } protected void ConnectBasic(string username, string secret) @@ -165,7 +169,7 @@ await MakeRequest(new Request(endPoint) } } - public class TooManyRetriesException : Exception {} + public class TooManyRetriesException : Exception { } public class Request { @@ -186,8 +190,8 @@ public Request(string endPoint) return Task.FromResult(resp); }; - Parameters = new (); - Headers = new (); + Parameters = new(); + Headers = new(); ExpectedStatusCode = HttpStatusCode.OK; }