There is a class for post, get requests:
public class ExternalCommunicationManager { private string _serverUrl; public ExternalCommunicationManager() { _serverUrl = ConfigurationManager.AppSettings["ServerUrl"]; } public async Task<IRestResponse> PostRequest(string url, string data, string token = null) { var client = new RestClient(_serverUrl + url); var request = CreateRestRequest(Method.POST, token); request.AddParameter("application/json; charset=utf-8", data, ParameterType.RequestBody); // execute the request var response = await client.ExecuteTaskAsync(request); return response; } ... private static RestRequest CreateRestRequest(Method method, string token) { var request = new RestRequest { Method = method, RequestFormat = DataFormat.Json, Timeout = 30000 }; request.AddHeader("Authorization", token); return request; } } There are also several classes that are injected via ninjects like InSingletonScope
Payment Manager, UserManager, and so on.
Actually the question is, how is it better and more correct to inherit the class that makes the requests and call the methods of the parent class, or inject it as a SingletonScope inside these managers into the constructor and call it through a private field there?